₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,110 members, 8,420,388 topics. Date: Thursday, 04 June 2026 at 06:19 PM

Toggle theme

Please Guys Help Me With This Javascript Problem - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersPlease Guys Help Me With This Javascript Problem (469 Views)

1 Reply

Please Guys Help Me With This Javascript Problem by Stephenben(op): 9:37am On Oct 02, 2017
I can't seem to get this JavaScript right.. Been trying out the code for it to work but its not responding.. It was working with other codes but this particular code. It ain't working..


<DOCTYPE html>
<html>
<body>
<h1>JavaScript</h1>
<p id="love"> I love JavaScript</p>
<p id="fun">It's so fun</p>
<button type="button" onclick="myFunction()">New Codes</button>
<script>
function myFunction()
{
document.getElementById("love"wink.innerHTML="I love html";
document.getElementById("fun"wink.innerHTML="It's so cool";
</script>
<p> Click button to change the words</p>
Re: Please Guys Help Me With This Javascript Problem by Prec1ous(m): 9:46am On Oct 02, 2017
Try this code instead

<DOCTYPE html>
<html>
<body>
<h1>JavaScript</h1>
<p id="love"> I love JavaScript</p>
<p id="fun">It's so fun</p>
<button type="button" onclick="myFunction()">New Codes</button>
<script>
function myFunction()
{
document.getElementById("love"wink.innerHTML="I love html";
document.getElementById("fun"wink.innerHTML="It's so cool";
}
</script>
<p> Click button to change the words</p>[/quote]
Re: Please Guys Help Me With This Javascript Problem by Stephenben(op): 2:10pm On Oct 02, 2017
Thanks bro.. I found my error.. I didn't add the closing curly bracket }
1 Reply

Please Guys Help Me Criticize My New Forum Site DesignPlease I Need Help With This Javascript IssuePlease Guys I Need Photoshop. Who Can Send To Me?234

Earn $50 Per Day Without Any Invest Weekly Payment With ProofAn SEO Guide For Multi-regional And Multilingual SitesMy Blog Application To Google Adsense Was Disapprove For The Fourth Time