skip to Main Content

javascript function arguments apostrophe

The simple code explains my problem best: <html> <head> <script> function showDiv (divId, dat){ document.getElementById(divId).innerHTML = dat ; document.getElementById(divId).style.display = "block" ; } </script> </head> <body> <div onclick="showDiv(1, '<div onclick='showDiv(2, 'test C');'>test B</div>')">test A</div> <div id="1" style="display:none;"></div> <div id="2" style="display:none;"></div>…

VIEW QUESTION

(.0) float in Javascript

I am trying to do write a code for a function that displays a boolean after checking if the value is an integer or not. see my definition of an integer in my ideal outputs below when i call the…

VIEW QUESTION
Back To Top
Search