var jm = window.location.host;//获取计算机名 var dk = window.location.port;//获取端口 var str = "/Lists/List2/EditForm.aspx"; var wh = window.location.search;//问号后面的
window.location.href = 'http://'+jm+dk+str+wh;