久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript怎么實現(xiàn)點擊按鈕跳轉(zhuǎn)頁面

      點擊按鈕跳轉(zhuǎn)頁面的方法:首先在按鈕元素中使用onclick屬性綁定點擊事件,規(guī)定發(fā)生點擊事件時,執(zhí)行myFunction()函數(shù);然后在myFunction()函數(shù)中,定義“l(fā)ocation.href="頁面地址"”語句進行跳轉(zhuǎn)。

      javascript怎么實現(xiàn)點擊按鈕跳轉(zhuǎn)頁面

      本教程操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

      javascript點擊按鈕跳轉(zhuǎn)頁面的方法:

      • 在按鈕元素中綁定點擊事件

      • 發(fā)生點擊事件時,使用location.href語句進行跳轉(zhuǎn)

      代碼示例:

      <p id="demo">點擊按鈕,進行頁面跳轉(zhuǎn)。</p>  <button onclick="myFunction()">點擊按鈕</button>  <script> 	function myFunction() { 		window.location.href='https://www.php.cn/'; 	} </script>

      效果圖:

      javascript怎么實現(xiàn)點擊按鈕跳轉(zhuǎn)頁面

      【推薦學(xué)習(xí):javascript高級教程】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號