jquery - alert in javascript not showing -
<!doctype html> <html> <head> <script type="text/javascript"> if (document.getelementbyid("popup")) { window.alert("hi"); } </script> </head> <body> <h1 id="popup">dfdfs</h1> </body> </html>
i have simple javascript shows alert when h1 id exits ,but not getting alert message.code in jquery can help.
put <script>
tag @ end of body
:
<!doctype html> <html> <head> </head> <body> <h1 id="popup">dfdfs</h1> <script type="text/javascript"> if (document.getelementbyid("popup")) { window.alert("hi"); } </script> </body> </html>
Comments
Post a Comment