<input type=button onclick="document.execCommand('saveas','true','网站制作.txt')">//另存为txt document.execCommand("SaveAs")//保存为 document.execCommand('undo')//撤销上一次操作
89.web对话框 <SCRIPT> var contents='<style>body,td{font:menu}img{cursor:hand}</style>'; contents+='<title>你要关闭我吗</title>'; contents+='<body bgcolor=menu>'; contents+='<table width=100% height=100% border=0>'; contents+='<tr><td align=center>'; contents+='你要关闭我吗?<br>'; contents+='<img src=dark.gif onclick=self.close() alt="...关闭">'; contents+='<img src=jet.gif onclick=self.close() alt="全是关闭">'; contents+='</td></tr></table>'; showModalDialog("about:"+contents+"","","dialogHeight:50px;dialogWidth:250px;help:no;status:no") document.write(contents); </SCRIPT>//
90.取第x,y的值 <button onclick="t1.rows[x].cells[y].innerText='guoguo'"></button>//
91.向新打开的网页上写内容 newwin=window.open('about:blank','','top=10'); newwin.document.write('');//
93.返回 javascript:history.go(-2);//
94.将页面上选中的内容复制到剪贴板 abcdefg <input type='button'
onclick="window.clipboardData.setData('text',document.selection.createRange().text);" value='复制页面选中
的字符'>// 95.将页面上选中的内容复制到剪贴板 <INPUT TYPE="text" NAME="">kjhkjhkhkj<INPUT TYPE="button" onclick="document.execCommand('Copy', 'false',
null);">////
96.鼠标移到下拉框时自动全部打开 <select onmouseover="javascript:this.size=this.length" onmouseout="javascript:this.size=1"></select>//
97.获得本机的文件 var fso = new ActiveXObject("Scripting.FileSystemObject"); var f1 = fso.GetFile("C:\\bsitcdata\\ejbhome.xml"); alert("File last modified: " + f1.DateLastModified); //
98.判断客户端是否是IE浏览器 因为 document.all 是 IE 的特有属性,所以通常用这个方法来判断客户端是否是IE浏览器 ,document.all?1:0;
99.创建新的下拉框选项 new Option(text,value)这样的函数//
100.在页面上画柱状图 <STYLE> td{font-size:12px} body{font-size:12px} v\:*{behavior:url(#default#VML);} //这里声明了v作为VML公用变量 </STYLE> <SCRIPT LANGUAGE="JavaScript"> mathstr=12; document.write ("<v:rect fillcolor='red'
style='width:20;color:navy;height:"+5000/(1000/mathstr)+"'><br> %"+mathstr+"<br>4人<v:Extrusion
backdepth='15pt' on='true'/></v:rect>") </SCRIPT> <v:rect fillcolor='red' style='width:20;color:navy;height:200'><br>%12<br>4人<v:Extrusion
backdepth='15pt' on='true'/></v:rect> <v:rect fillcolor='yellow' style='width:20;color:navy;height:100'><br>%12<br>4人<v:Extrusion
backdepth='15pt' on='true'/></v:rect>//
101.饼图 <style> v\:* { behavior: url(#default#VML) } o\:* { behavior: url(#default#VML) } .shape { behavior: url(#default#VML) } </style> <script language="javascript"> function show(pie) { pie.strokecolor=pie.fillcolor; pie.strokeweight=10; div1.innerHTML="<font size=2 color=red> " + pie.id +"</font> <font size=2>" + pie.title + "</font>"; } function hide(pie) { pie.strokecolor="white"; pie.strokeweight=1; div1.innerHTML=""; } </script> </head> <body> <v:group style='width: 5cm; height: 5cm' coordorigin='0,0' coordsize='250,250'> <v:shape id='asp技术' style='width:10;height:10;top:10;left:0' title='得票数:6 比例:40.00%'
onmouseover='javascript:show(this);' onmouseout='javascript:hide(this);' href='http://www.cnADO.com'
CoordSize='10,10' strokecolor='white' fillcolor='#ffff33'><v:path v='m 300,200 ae
300,200,200,150,0,9437184 xe'/></v:shape> <v:shape id='php' style='width:10;height:10;top:10;left:0' title='得票数:1 比例:6.67%'
onmouseover='javascript:show(this);' onmouseout='javascript:hide(this);' href='http://www.cnADO.com'
CoordSize='10,10' strokecolor='white' fillcolor='#ff9933'><v:path v='m 300,200 ae
300,200,200,150,9437184,1572864 xe'/></v:shape> <v:shape id='jsp' style='width:10;height:10;top:10;left:0' title='得票数:2 比例:13.33%'
onmouseover='javascript:show(this);' onmouseout='javascript:hide(this);' href='http://www.cnADO.com'
CoordSize='10,10' strokecolor='white' fillcolor='#3399ff'><v:path v='m 300,200 ae
300,200,200,150,11010048,3145728 xe'/></v:shape> <v:shape id='c#写的.netWEB程序' style='width:10;height:10;top:10;left:0' title='得票数:3 比例:20.00%'
onmouseover='javascript:show(this);' onmouseout='javascript:hide(this);' href='http://www.cnADO.com'
CoordSize='10,10' strokecolor='white' fillcolor='#99ff33'><v:path v='m 300,200 ae
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一页 1 2 3 4 5 67 8 9 10 11 12 13 14 15 16 17 下一页
上一篇:Js之软键盘实现(源码) 下一篇:如何优化JavaScript脚本的性能
|