| A method that opens a popup so the user can enter a value prompt window method |
Example 2)
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko"lang="ko"> |
|
|
|
|
|
<head> |
|
|
<meta http-equiv="Content-Type"content="application/xhtml+xml; charset=UTF-8" /> |
|
|
<title> Basic JavaScript Document Structure </title> |
|
|
<meta name="Keywords" content="" /> |
|
|
<meta name="Description" content="" /> |
|
|
</head> |
|
|
<body> |
|
|
|
|
|
<p>test"1"</p> |
|
|
<p>test2</p> |
|
|
|
|
|
<script type="text/javascript"> |
|
|
//<!CDATA[ |
|
|
var name=prompt("Your favorite celebrity",""); |
|
|
// prompt is a window method. |
|
|
// In the second " " of (," "), you can place a default value. |
|
|
|
|
|
document.write(name); |
|
|
//]]]]> |
|
|
</script> |
|
|
|
|
|
</body> |
|
|
</html> |
