<!DOCTYPE html><html><head>? ? <meta charset="UTF-8">? ? <title>location方法練習(xí)</title></head><body>? ? <input type="button" value="操作頁面" id="ck">? ? ? ? <script type="text/javascript">? ? ? ? ? var click=document.getElementById("ck");? ? ? ? ? click.onclick=function(){? ? ? ? ? ? var a=window.confirm("刷新頁面么");? ? ? ? ? ? if (a==true) {? ? ? ? ? ? ? ? location.reload();? ? ? ? ? ? }else{? ? ? ? ? ? ? ?location.repalce("http://idcbgp.cn");? ? ? ? ? ?}? ? ? ?}? ?</script></body></html>
為什么這個(gè)不跳轉(zhuǎn)呢? location.repalce("http://idcbgp.cn");錯(cuò)在哪里?
祀未
2017-04-27 23:04:28