)<section><divclass="row"> <divclass="col-xs-12col-sm-12col-md-12col-"> Change content in another Div using Javascript-PHP Chinese Network Q&A
Change content in another Div using Javascript
P粉769045426
P粉769045426 2023-09-05 23:33:53
0
1
446

I want to change another div (id="new-text"< by clicking on the link container and using a JavaScript function (show-text()) /code>) content code>)

 

P粉769045426
P粉769045426

reply all (1)
P粉232793765


Changed code (working)

Insideonclick="show-text(), pass a valid parameter (matching your IF condition), such as "text-1" or "text-2"..

should be
So does the rest.

And use===(strict equality check) in Script for comparison. CheckJs comparison operators

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!