Simple button

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! :)

Code Snippet:

                                                
                                                <!-- 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>                                                
                                            

Example:


About @

This user is pending a biography.


Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: CryptoTech, AstroAudrey, admin_js, bloxio, yqaice
advertisement 2