Skip to content Skip to sidebar Skip to footer

What Happen With My Script Tag .why It Is Showing Red Color(error)

[![][2]][2] See Script Tag ..why Script tag and element under Script tag showing red color(error) and when I try to call this function on onClick method it's showing that this fun

Solution 1:

You forgot a closing quotation mark on line 33 for onclick. Adding it should fix the highlighting issues.


Solution 2:

You are missing the ending quote in the onclick attribute for your img.

<img src="../MovieLandingPage/images/close.png" class="close" onclick="toggle();"/>

Solution 3:

Invalid markup for image below is valid markup

<img src="../MovieLandingPage/images/close.png" class="close" onclick="toggle();" />

Solution 4:

If that image is your current situation, then your function is no longer named toggle() but toggleControls().

As for your script tag, you left a space before the closing bracket of the opening tag: <script >.
I'm not sure, but changing it to <script> might do the trick.

As a side note, in
<img src="../MovieLandingPage/images/close.png" class="close"onclick="toggle();>
you're missing a closing quotation mark for the onclick attribute.
And you should really make a habit of separating your attributes by spaces, it's a lot more readable.


Post a Comment for "What Happen With My Script Tag .why It Is Showing Red Color(error)"