Prev Demo
JavaScript
>
Javascript Code Placing In HTML Page
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Title</title> <script language="javascript" type="text/javascript"> function AlertMe() { alert("I am called from JavaScript!"); } </script> </head> <body> <h1>Code Placement</h1> <input type="button" id="btnTest" onclick="AlertMe()" value="Click me!" /> <p><strong>Note: </strong>Please observe the code in the left side box, the JavaScript code is place inside the Head Tag.</p> </body> </html>
Note: We DO NOT save your trial code in our database.
Output