亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

?????? ??

JavaScript??? ?? ??, ?? ??, ???? ??? ? ?? ??? ??? ??? ?? ? ????.

JavaScript ??()

??: ?? ??("sometext");

JavaScript?? ?? ??? ???? ??? ?? ??? ????:

<script type="text/javascript " >
Alert("?? ???? ??????!");
</script>

??? ?? ??? ?? ?? ?????. ?? ??? ???? ???? ?? ??? ???? ???. ??? ???? ?? ?? ??? ?????.

alert ???? ????? ????? ??? ???? HTML ??? ?? ??? ????? ????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
function myFunction(){
   alert("我是一個警告框!");
}
</script>
</head>
<body>
   <input type="button" onclick="myFunction()" value="警告框" />
</body>
</html>

JavaScript verify()

JavaScript?? ?? ??? ???? ??? ?? ??? ????.

??: ??confirm("sometext");

?? ??? ????? ???? ??? ?????.

?? ??? ???? ???? "??" ?? "??"? ???? ??? ??? ??? ? ????.

"??"? ???? ?? ??? true? ?????. "??"? ???? ?? ??? false? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文網(wǎng)(php.cn)</title>
<script>
    if (confirm("您確認(rèn)要刪除該條信息嗎?")){
    alert("您選擇了刪除!");
    } else {
    alert("您選擇了不刪除");
    }
</script>
</head>
<body>
</body>
</html>

JavaScript ????()

??: prompt("sometext","defaultvalue");


?? ??

prompt()? ? ?? ????? ?????. ? ?? ????? ???????. ??? ???? ?? ? ?? ????? ?? ?? ?????. ?? ??? ?? ?? ??? ????()? ?? ??? ?(HTML ?? ??)? ????, ??? ??? null? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文網(wǎng)(php.cn)</title>
<script>
    var name = prompt("請輸入您的名字:","默認(rèn)字符")
    if (name!=null && name!=""){
    document.write("你好," + name + "!")
    }
</script>
</head>
<body>
</body>
</html>

? ??

?? ???? ???? + "n"(n)? ???? ? ??? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文網(wǎng)(php.cn)</title>
</head>
<body>
    <button onclick="myFunction()">點擊顯示</button>
    <p id="demo"></p>
<script>
    function myFunction(){
    alert("Hello\nHow are you?");
    }
</script>
</body>
</html>


???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <button onclick="myFunction()">點擊顯示</button> <p id="demo"></p> <script> function myFunction(){ alert("我是當(dāng)前顯示文字\n我是換行文字"); } </script> </body> </html>