添加网页加载进度窗口,以及各种方法
添加网页加载进度窗口1: PHPChina 开源社区门户
添加网页加载进度窗口
1: <html>PHPChina 开源社区门户#S*u"I Q,h
2: <head>
;Q }Xi.h{ X%ESJ296053: <scrīpt language=’javascrīpt’>
sZ3f+mj(o{1w296054: var placeHolder = window.open(’holder.html’,'placeholder’,'width=200,height=200′);
*Z)ipGi;W@296055: </scrīpt>PHPChina 开源社区门户4P;S"D/D c [ d:]v
6: <title>The Main Page</title>
zwm:w[^ Q296057: </head>PHPChina 开源社区门户oN @q*d `;o_4H@
8: <body ōnLoad=’placeHolder.close()’>PHPChina 开源社区门户E$k'O0s-}7L#dn
9: <p>This is the main page</p>PHPChina 开源社区门户 r3| P~/r? tcO
10: </body>
%DIM$D,{|!A&r.~7Ar2960511: </html>
读取图像属性
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>
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)