读取图像属性
1: <img src=”/”image1.jpg”” name=”myImage”>
.b-LW1Q'~Q&C7j296052: <a href=”# ” ōnClick=”window.alert(document.myImage.width)”>Width</a>PHPChina 开源社区门户J'i8d9@2e-Y
1g;X2omu29605 动态加载图像
1: <scrīpt language=”Javascrīpt”>
lLW6v%Y }v296052: myImage = new Image;PHPChina 开源社区门户'y2T//Vi6|'~%MR?C
3: myImage.src = “Tellers1.jpg”;PHPChina 开源社区门户9RW'q+s b
4: </scrīpt>
定时执行函数
1: <scrīpt>PHPChina 开源社区门户)B w:F1z:e/`yxE {I
2: <!–
+kg-/e#gLU4wy296053: function hello() {PHPChina 开源社区门户/[aE?Ab
4: window.alert(“Hello”);
*i9M3/a G$g{t fE'K296055: window.setTimeout(“hello()”,5000);PHPChina 开源社区门户0kU+GA W
6: }PHPChina 开源社区门户9z3^(k9IE^u)vhav k
7: window.setTimeout(“hello()”,5000);PHPChina 开源社区门户 d6Lj8O`7H)A
8: // –>PHPChina 开源社区门户lvo&i+o:uc2S A
9: </scrīpt>
取消定时执行
1: <scrīpt>PHPChina 开源社区门户o%z(V/m5A FG,zxB
2: <!–
&~{[6e%nPp)AN296053: function hello() {
MkHYi3s)a!z[296054: window.alert(“Hello”);
?0f&iu)PM(/?296055: }
gB@qT$]d'h:@7i296056: var myTimeout = window.setTimeout(“hello()”,5000);PHPChina 开源社区门户c!{/}c0N
7: window.clearTimeout(myTimeout);
?SQJz!?-lg:B296058: // –>PHPChina 开源社区门户@w j.Jtk@ L?2P m }
9: </scrīpt>