<html>
<body>
<div id="demo">
Click the button to display character of the specified unicode number.</div>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction(){
var n=String.fromCharCode(0xB4); //----> simbol kali
var n=String.fromCharCode(0xB8); //----> simbol bagi
document.getElementById("demo").innerHTML=n;
}
</script>
</body>
</html>
sumber:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_fromcharcode
Tidak ada komentar:
Posting Komentar