<script>
var str = "张三";
//alert(encodeURI(str));后面的全部都是运行结果,下同//%E5%BC%A0%E4%B8%89
//alert(encodeURIComponent(str));//%E5%BC%A0%E4%B8%89
//alert(decodeURI(encodeURI(str)));//张三
//alert(decodeURIComponent(encodeURIComponent(str)));//张三
var str1 = "http://www.jxust.cn";
//alert(encodeURI(str1));//http://www.jxust.cn
//alert(encodeURIComponent(str1));//http%3A%2F%2Fwww.jxust.cn
//alert(decodeURI(encodeURI(str1)));//http://www.jxust.cn
//alert(decodeURIComponent(encodeURIComponent(str1)));//http://www.jxust.cn
var str2 = "alert('abc')";
//alert(str2);//alert('abc')
eval(str2);//abc
</script>
var str = "张三";
//alert(encodeURI(str));后面的全部都是运行结果,下同//%E5%BC%A0%E4%B8%89
//alert(encodeURIComponent(str));//%E5%BC%A0%E4%B8%89
//alert(decodeURI(encodeURI(str)));//张三
//alert(decodeURIComponent(encodeURIComponent(str)));//张三
var str1 = "http://www.jxust.cn";
//alert(encodeURI(str1));//http://www.jxust.cn
//alert(encodeURIComponent(str1));//http%3A%2F%2Fwww.jxust.cn
//alert(decodeURI(encodeURI(str1)));//http://www.jxust.cn
//alert(decodeURIComponent(encodeURIComponent(str1)));//http://www.jxust.cn
var str2 = "alert('abc')";
//alert(str2);//alert('abc')
eval(str2);//abc
</script>