javascript
共 3 篇文章
【转】去除输入框内容的所有空格
原文地址 http://www.devcurry.com/2010/11/remove-all-white-space-using-javascript.html <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Remove Whitespaces using JavaScript by DevCurry.com</title> <script type="text/javascript"> function removeWhitespaces() { var txtbox = document.getElementByI…
2011-06-14 09:48 · javascript
如何判断iframe中的页面加载完毕
2010-11-18 17:28 · javascript
用javascript判断上传图片的大小
<input type="file" id="file" /> <script type="text/javascript"> var f = document.getElementById('file'); f.onchange = function(){ var i = new Image() , f_val = f.value , isImg = /jpg|gif/i.test( (f_val.match(/\.(\w+)$/)[0]).toLowerCase() ) , num_tmp = 0; i.src = f_val; if(!isImg){ alert('图片格式不对,请选择…
2010-08-17 14:49 · javascript