<?phpecho $_GET['key'];?>
当url为http://test.com/c.php?key=999时,正常输出:999
当url为http://test.com/c.php?key=9#888时,只能输出:9
而我想要获得的是9#888,那要怎么办呢?只能在把9#888传递给key的这个环节想办法。
查询<script> function searchsn() { var keys = $('#searchs').val();*本文来源gaodai#ma#com搞@代~码^网+搞代gaodaima码 if (keys == '') { alert('请填写SN码'); return false; } keys = escape(keys); //对字符串进行编码,* @ - _ + . / 这几个字符除外 window.location.href = 'c.php?key=' + keys; }</script>