javascript
文章平均质量分 53
xul2009
这个作者很懒,什么都没留下…
展开
-
Javascript set and get methods Textarea cursor position
JS Set the cursor position and access to Textarea var isIE = !(!document.all); function posCursor(){ var start=0,end=0; var oTextarea = document.getElementById("textarea");转载 2013-09-11 23:55:07 · 1064 阅读 · 0 评论 -
在光标处插入字符串的实现代码兼容IE,Firefox
复制代码 代码如下: // 在光标处插入字符串 // myField 文本框对象 // 要插入的值 function insertAtCursor(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.crea转载 2013-09-13 22:50:50 · 558 阅读 · 0 评论 -
javascript中IE浏览器不支持NEW DATE()带参数的解决方法 (转)
var dateTimes = '2010-02-05 02:02:02'; var date1=new Date(dateTimes); //在火狐下 可以正常取得时间,在IE下 却是 NaN 换成下面的方法就好了。 function NewDate(str) { str = str.split('-'); var date = new Date(); date.setU转载 2014-01-12 10:22:36 · 757 阅读 · 0 评论 -
ExtJs设置cookie两种方式
其一:设置cookie如下 saveacct=isForm.getForm().findField('itemselector').getValue(); Ext.util.Cookies.set('saveacct',saveacct); 取cookie中数据如下 var validStatus = Ext.util.Cookies.get("saveacct"); alert转载 2014-04-17 23:17:35 · 542 阅读 · 0 评论