1 Adding A JavaScript Button Sun May 16, 2010 11:00 pm
Krazy
Registered Member
Okay WebArtz Members,
To start off, I will show you the full code we will be making.
Now I will explain the code.
Now, Inside the (""). In between the "" you can put whatever text you like.
________________________________
Now I will explain the last part of the code.
_________________________
Thank you for viewing my tutorial. This was all written by me; Sanket if I need to add anything else let me know.
To start off, I will show you the full code we will be making.
- Code:
<html>
<head>
<script>
function myfunction()
{
alert("This Is Krazy's Tutorial");
}
</script>
</head>
<body>
<form name="myform">
<input type="button" value="Click Me" onclick="myfunction()">
</form>
</body>
</html>
To View An Example, Please Visit Here
Now I will explain the code.
- alert("This Is Krazy's Tutorial");
What I have bolded above can be edited. Where it says alert, You can put one of the three ones I list below. - Alert
- Confirm
- Prompt
________________________________
Now I will explain the last part of the code.
- <input type="button" value="Click Me" onclick="myfunction()">
- What I have bolded above is the name that will show on the button. You may edit that to whatever you like.
_________________________
Thank you for viewing my tutorial. This was all written by me; Sanket if I need to add anything else let me know.