Image Caption

Monday, January 23, 2012

Autofill input field with value another field

<html>
<head>
<script type="text/javascript" language="JavaScript" >
function changeVal() {
s1 = new String(contact.inputone.value);
document.contact.inputtwo.value = s1;
}
</script>
</head>
<body>
<BR>
<BR>
<form name="contact">
Input:
<input type="text" name="inputone" value="" onkeyup = "changeVal()">
<br/>
Auto :
<input type="text"  name="inputtwo" value="">
</form>
</body>
</html>

No comments: