一、获取地址栏参数的方法

获取地址栏参数的方法

<scripttype="text/javascript">(function($){$.getUrlParam=function(name){varreg=newRegExp("(^|&)"+name+"=([^&]*)(&|$)");varr=window.location.search.substr(1).match(reg);if(r!=null)returnunescape(r[2]);returnnull;}})(jQuery);$(function(){alert(window.location.href);alert($.getUrlParam('page'));})</script>


获取href连接:

$(document).ready(function(){$("button").click(function(){alert($("#w3s").attr("href"));});});

二、跳转:

1.在原来的窗体中直接跳转用

window.location.href="你所要跳转的页面";

2、在新窗体中打开页面用:

window.open('你所要跳转的页面');window.history.back(-1);返回上一页