简单脚本问题,来者有分.
document.write( '\u786e\u5b9a\u8981\u5220\u9664\u5417\uff1f ');
输出结果为:确认要删除吗?
请问:\u786e\u5b9a\u8981\u5220\u9664\u5417\uff1f是使用什么编码得到的?
有没有什么规则去读懂它?
------解决方案--------------------utf-8编码
使用
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
</HEAD>
<BODY>
<span id= "spp "> </span>
<br>
<script>
document.getElementById( 'spp ').innerText = escape( '确定要删除吗? ');
document.write( '\u786e\u5b9a\u8981\u5220\u9664\u5417\uff1f ');
</script>
</BODY>
</HTML>
------解决方案--------------------unescape()解码
------解决方案--------------------为什么不写成汉字呢? js里面写汉字也支持阿
------解决方案--------------------unescape