close

 

先寫個 html

<DOCTYPE HTML>
<html>
<head>
     <title>test</title>
<script>
    alert("Hello !!")
    var user_name;
    user_name=prompt("Input name : ")
    document.write("Hi "+ user_name + "!");
    if (confirm("want to go to " + user_name ))
       document.location.href ="http://www." + user_name + ".com";
</script>
</head>
<body>
</body>
</html>

第一個 alert

第二個 prompt

第三個 confirm

 

arrow
arrow

    echochio 發表在 痞客邦 留言(0) 人氣()