IT入门 > 实战案例 >
  • 实例解析 日期:2022-06-23 点击:714 基础 JavaScript 实例

    ...

  • 声明一个变量,为它赋值,然后显示出来 日期:2022-06-23 点击:663 javascript条件与循环

    声明一个变量,为它赋值,然后显示出来 !DOCTYPE htmlhtmlhead meta charset="utf-8" title滴答编程(dida100.com)/title /headbodyscriptvar firstname;firstname="Hege";document.write(firstname);document.write("br");firstname="T...

  • If 语句 日期:2022-06-23 点击:1487 javascript条件与循环

    If 语句 !DOCTYPE htmlhtmlheadmeta charset="utf-8"title滴答编程(dida100.com)/title/headbodyp如果时间早于 20:00,会获得问候 "Good day"。/pbutton onclick="myFunction()"点击这里/buttonp id="demo"/pscriptfunction myFunctio...

  • If...else 语句 日期:2022-06-23 点击:694 javascript条件与循环

    If...else 语句 !DOCTYPE htmlhtmlheadmeta charset="utf-8"title滴答编程(dida100.com)/title/headbodyp点击这个按钮,获得基于时间的问候。/pbutton onclick="myFunction()"点击这里/buttonp id="demo"/pscriptfunction myFunct...

  • 随机链接 日期:2022-06-23 点击:817 javascript条件与循环

    随机链接 !DOCTYPE htmlhtmlhead meta charset="utf-8" title滴答编程(dida100.com)/title /headbodyp id="demo"/pscriptvar r=Math.random();var x=document.getElementById("demo")if (r0.5){x.innerHTML="a href='http://www.dida100.com'访问滴答...

  • Switch 语句 日期:2022-06-23 点击:1211 javascript条件与循环

    Switch 语句 !DOCTYPE htmlhtmlheadmeta charset="utf-8"title滴答编程(dida100.com)/title/headbodyp点击下面的按钮来显示今天是周几:/pbutton onclick="myFunction()"点击这里/buttonp id="demo"/pscriptfunction myFunction(){...

  • 实例解析 日期:2022-06-23 点击:1576 javascript条件与循环

    ...

  • Alert(警告)框 日期:2022-06-23 点击:1429 JavaScript 消息框

    Alert(警告)框 !DOCTYPE htmlhtmlheadmeta charset="utf-8"scriptfunction myFunction(){alert("你好,我是一个警告框!");}/script/headbodyinput type="button" onclick="myFunction()" value="显示警告框" //body/html 尝试一下...

  • 带有换行的警告框 日期:2022-06-23 点击:1483 JavaScript 消息框

    带有换行的警告框 !DOCTYPE htmlhtmlheadmeta charset="utf-8"title滴答编程(dida100.com)/title/headbodyp点击按钮在弹窗中使用换行。/pbutton onclick="myFunction()"点我/buttonp id="demo"/pscriptfunction myFunction(){aler...

  • 确认框 日期:2022-06-23 点击:1004 JavaScript 消息框

    确认框 !DOCTYPE htmlhtmlheadmeta charset="utf-8"title滴答编程(dida100.com)/title/headbodyp点击按钮,显示确认框。/pbutton onclick="myFunction()"点我/buttonp id="demo"/pscriptfunction myFunction(){var x;var r=confirm("按下...