how to take input from form and display in javascript
<html>
<head>
<title>Form Example</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function display() {
DispWin = window.open('','NewWin', 'toolbar=no,status=no,width=300,height=200')
message = "<ul><li><b>NAME: </b>" + document.form1.yourname.value;
message += "<li><b>ADDRESS: </b>" + document.form1.address.value;
message += "<li><b>PHONE: </b>" + document.form1.phone.value + "</ul>";
DispWin.document.write(message);
}
</script>
</head>
<body>
<h1>Form Example</h1>
Enter the following information. When you press the Display button,
the data you entered will be displayed in a pop-up window.
<form name="form1">
<p><b>Name:</b> <input TYPE="TEXT" SIZE="20" NAME="yourname">
</p>
<p><b>Address:</b> <input TYPE="TEXT" SIZE="30" NAME="address">
</p>
<p><b>Phone: </b> <input TYPE="TEXT" SIZE="15" NAME="phone">
</p>
<p><input TYPE="BUTTON" VALUE="Display" onClick="display();"></p>
</form>
</body>
</html>
Also in JavaScript:
- implement the remove property function
- Write a regular expression to validate phone number in XXX-XXX-XXXX format?
- nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + nodemon index
- how to change a string to number in javascript
- check window resize javascript
- node send file
- are you sure you want to proceed click ok button javascript code
- click binding angular 8
- js is undefined or null
- jquery get data attribute value
- rafraichir page javascript
- animate in jquery
- anonymous functions javascript
- vuejs accessing props from data
- npx for windows
- Event Popover
- javascript todataurl
- file input disable open file picker javascript
- delete backspace on string js
- how to update angular version
- serverless and connections mongodb atlas
- how to call function on every keypress in jquery
- javascript audio duration property returns infinity
- javascript get filename from url