`
E,我卡了
  • 浏览: 31009 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

escape和encodeURI

 
阅读更多

<html>
	<head>
			<script type="text/javascript">
				function testJs(){
					var tem1 = "xingming";
					var tem2 = "姓名";
					
					var result = encodeURI(tem2);
					alert(result);
				}
				
				function testJs2(){
					var tem1 = "xingming";
					var tem2 = "姓名";
					
					var result = escape(tem2);
					alert(result);
				}
				</script>
		</head>
	<body>
		<input type = "button" name = "" id = "" value = "TEST" onclick = "testJs();">
		<input type = "button" name = "" id = "" value = "TEST" onclick = "testJs2();">
		</body>	
</html>
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics