John Delmark Aguilar

Delmark - Profiling
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 [JS]Simple Javascript Form Alert

View previous topic View next topic Go down 
AuthorMessage
dElmARk
Admin
Admin
avatar

Posts : 92
Join date : 09/04/2012

PostSubject: [JS]Simple Javascript Form Alert   Fri Feb 28, 2014 1:31 pm

Code:
<body onload="myAlert()">
<script type="text/javascript">

function myAlert(){
alert("Example of button and text objects");
}
function dothis(){
alert(document.forms[0].elements[0].value);
}
</script>

<form name="myform">
<p><input type = "textfield" name = "myname" size=20 onblur='alert(this.value)', value="enter your name here" onclick="this.value='' ">
<input type = "button" value="submit" onclick="dothis()" name ="button1"><br>
<input type = "button" value="Click here to set to the default value" onclick="document.myform.myname.value=document.myform.myname.defaultValue" name ="button2"><br>
</form>
</body>
Back to top Go down
View user profile http://delmark.meabout.com
 
[JS]Simple Javascript Form Alert
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
John Delmark Aguilar :: dElmARk Productions :: Web Coding-
Jump to: