It's free and you have access to premium codes!
Welcome back! Please login to your account.
Don't worry, we'll send you a message to help you to recover your acount.
Please check your email for instructions to activate your account.
Written by 10 December 2012
A simple button that will display a message when the page opens. The text after "alert" is the text that will come up. The text after "value=" is the text in the button. Pretty simple but fun to use! :)
<!-- this script is provided by https://www.javascriptfreecode.com coded by: Kerixa Inc. -->
<html>
<head>
<script type="text/javascript">
function myFunction()
{
alert("<-Your text here->");
}
</script>
</head>
<body>
<input type="button" onclick="myFunction()" value="<-Your text here->" />
</body>
</html><a target='_blank' href='https://www.javascriptfreecode.com' style='font-size: 8pt; text-decoration: none'>JavaScript Best Codes</a>
Comments
Here you can leave us commments. Let us know what you think about this code tutorial!