JS替换当前网页的方法
来源:绵阳动力网络公司  时间:2015-06-02  阅读:20

这篇文章主要介绍了JavaScript替换当前页面的方法,涉及javascript中replace方法的使用技巧,具有一定参考借鉴价值,需要的朋友可以参考下:

<!DOCTYPE html> 
<html> 
<head> 
<script>
 function replaceDoc() {
 window.location.replace("http://www.webmy.cn") } 
</script> 
</head> 
<body> 
<input type="button" value="Replace document"onclick="replaceDoc()"> 
</body> 
</html>
 
  • 电话咨询

  • 0816-2318288