易截截图软件、单文件、免安装、纯绿色、仅160KB

关于javascript判断文件大小

<script type="text/javascript">  
function getFileSize(filePath) {  
   var image=new Image();  
   image.dynsrc=filePath;  
   alert(image.fileSize);  
}  
</script>  
<body>  
<INPUT TYPE="file" NAME="file" SIZE="30" onchange="getFileSize(this.value)">  
</body>


相关文档:

Javascript的document,window对象(DOM)


document对象:
对象属性:
  
document.alinkColor
//激活链接(焦点在此链接上)的颜色
 
document.all
//表示文档中所有HTML标记符的数组
 
document.anchors
//表示文档中所有锚的数组,锚是指带有name属性的A对象
 
document.applets
//表示文档中所有java小应用程序
 
document.b ......

javascript验证文本框内容

验证文本框内容不能为空
<input onblur="if(this.value.replace(/^ +| +$/g,'')=='')alert('不能为空!')">
只能输入英文和数字
<input onblur="if(/[^0-9a-zA-Z]/g.test(value))alert('有错')">
<input onkeyup="value=value.replace(/[^0-9a-zA-Z]/g,'')"/>
<input type="text" onkeyup="value ......

JavaScript中的面向对象 类


<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......

javascript 导出数据到Excel(处理table中的元素)

最近做的项目中有个要求,需要将数据导出到Excel中,关于这个就不是什么问题,网上的资料很多。可当Table中有Input(text)之类的元素是怎么办?
做法:
       修改Input的outerHTML;
具体例子:
function resetInput()
    {
      &nbs ......

JavaScript CSS Style属性参考

CSS语法 (不区分大小写)   JavaScript语法 (区分大小写)
border   border
border-bottom   borderBottom
border-bottom-color   borderBottomColor
border-bottom-style   borderBottomStyle
border-bottom-width   borderBottomWidth
border-color   borderColor
border-left   borderLeft ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号