javascript当中prompt的用法

5.prompt

例 1.5(promptIEFF.html)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<style type="text/css">
#divTest{
background-color:#9F3;
/*没有底下的margin为负,fireFox中老有个白边*/
margin-top:-8px;
margin-left:-8px;
width:500px;
height:500px;
}
</style>
</head>
<body>
<div id="divTest">
    body div
</div>
</body>
<script language="javascript" type="text/javascript">
 /* 返回值:Property/method value type:    String primitive
  JavaScript syntax:    -    myResult = myWindow.prompt(aString, aDefaultValue)
  -    myResult = prompt(aString, aDefaultValue)
  Argument list:    aDefaultValue    An initial content for the text box
  aString    Some text to explain what to enter

更多内容请见原文,文章转载自:https://blog.csdn.net/qq_43650923/article/details/103045943

posted @ 2021-11-29 17:08  malala  阅读(499)  评论(0编辑  收藏  举报