當前位置:編程學習大全網 - 遊戲軟體 - javascript:location.replace失效問題

javascript:location.replace失效問題

<script>

function test()

{

str=window.location;

alert(str);

str=str.replace('/'); //這裏返回什麽,

alert(str);

window.location.str;

}

</script>

<input type="button" value="取消" onclick="test()" class="button" />

妳看看我寫的測試的,應該有助於理解。

//----------------------

replace 方法

返回根據正則表達式進行文字替換後的字符串的復制。

stringObj.replace(rgExp, replaceText)

  • 上一篇:《第二名的逆襲》壹***有幾集?
  • 下一篇:lol端遊備戰在哪
  • copyright 2024編程學習大全網