XIYUETA.COM
源代码:
点击运行
<script src="../dist/xiyueta.min.js?v31"></script> <script> /* $.getUrlParam 获取URL中指定参数值 $.getQueryString 获取URL中指定参数值(第2种) $.log() 在浏览器里显示内容 == document.write() */ mytest("http://xiyueta/doc/log/1.jpg?aa=#1-3-0","aa") mytest("http://www.xiyueta.com/api/action.asp?act=handle&id=3","act") mytest("http://www.xiyueta.com/?act=1#","act") mytest("http://www.xiyueta.com/?act=1#","tt") function mytest(url,cs){ $.log(url+" , "+cs) $.log( $.getUrlParam(url,cs)+"" ) $.log( $.getQueryString(url,cs)+"" ) $.log("------------------") } </script>
运行结果