1
<p id="demo">单击按钮显示一个UNICODE编码的字符</p>
2
<button onclick="myFunction()">点我</button>
3
<script>
4
function myFunction() {
5
var n = String.fromCharCode(65);
6
document.getElementById("demo").innerHTML = n;
7
}
8
</script>
<p id="demo">单击按钮显示一个UNICODE编码的字符</p>
<button onclick="myFunction()">点我</button>
<script>
function myFunction() {
var n = String.fromCharCode(65);
document.getElementById("demo").innerHTML = n;
}
</script>