Last Update: 2010/12/28 13:51+08
Javascript Other (雜項、未整理)
======================================================
Convert between Char and Integer:
var str = "abc";
alert(str.charAt(0) +" = " + str.charCodeAt(0));
alert(String.fromCharCode(99));
======================================================
Client Rectangle:
alert(document.getElementById("myDiv").getBoundingClientRect().left);
//return is [left, top, right, bottom, width, height]
//its native code, support IE, Chrome, FireFofx, Safari?, Opera?
======================================================
沒有留言:
張貼留言