日期:2014-05-16 浏览次数:20564 次
function redirectURL(url,para) { window.location.href=url+encodeURIComponent(para); }
<A class="pl" href="/product/product.asp?id=<%Response.Write(rs("PartNo"))%>">
<A class="pl" onClick="javascript:redirectURL('/product/product.asp?id=', '<%Response.Write(rs("PartNo"))%>')">
<script type="text/javascript"> document.write(encodeURIComponent("http://www.test.com")) document.write("<br />") document.write(encodeURIComponent("http://www.test.com/p 1/")) document.write("<br />") document.write(encodeURIComponent(",/?:@&=+$#")) </script>
http%3A%2F%2Fwww.test.com http%3A%2F%2Fwww.test.com%2Fp%201%2F %2C%2F%3F%3A%40%26%3D%2B%24%23