- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>我的占卜小程式</title>
- </head>
- <body>
- 年:<input id="iyear"/><br/>
- 月:<input id="imouth"/><br/>
- 日:<input id="day"/><br/>
- <button onclick="alert('kdhjsbuxbeycbduvfufd'pg[sj">請按</button>
- <div id="resalt"></div>
- <script type="text/javascript">
- function calc () {
- var y =document. getElementById("iyear").value
- var m =document. getElementById("imouth").value
- var d =document. getElementById("iday").value
-
- document.getElementById("resalt").innerHTML=y+"|"+m"|"+d+"</br>"+
- 您的運勢是:+a[r])
- }
-
- </script>
- </body>
- </html>
複製代碼 |