<script language="JScript"> <!-- var url =" http://www.baidu.com/s?wd=编码" url = encodeURI(url); alert(url); //--> </script>