為什么設(shè)置按鈕點(diǎn)擊之后沒有反應(yīng)呢
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>location</title>
</head>
?<script type="text/javascript">
? ? function location(){
? ? ? ? document.write(window.location.href);
? ? }? ??
? ? ?
?</script>
<body>
? ? <form>
? ? ? ? <input type="button" value="點(diǎn)擊獲取輸出顯示文檔的URL" onclick="location()">
? ? ? ? ?
? ? </form>
</body>
</html>
2018-08-23
方法名稱不用關(guān)鍵詞 就能正常運(yùn)行了
2018-06-13
你把方法名字換一下,最好不是什么關(guān)鍵詞就好了