<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> url = location.search.substr(1); if (url.length > 0) { ar = url.split(/[&=]/); for (i = 0; i < ar.length; i += 2) { alert("参数:" + ar[i] + ":" + ar[i + 1] + "<br>"); } } </script> </head> <body> <a href='?a=你好&room=awe'>test</a> </body> </html>
冯瑞涛