|
Q9 How do I make a button that when clicked displays a message in a field?
irt.org | Knowledge Base | JavaScript | Form 10.1 | Q9 [ previous next ]
Q9 How do I make a button that when clicked displays a message in a field?
<form name="formName" onSubmit="return functionName();">
<input type=text name="textName">
<input type=submit value="Display">
</form>
<script language="JavaScript"><!--
function functionName() {
window.document.formName.textName.value = 'hello world';
return false;
}
//--></script>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.