12 2012 档案

摘要:$.fn.setCursorPosition = function(position){ if(this.lengh == 0) return this; return $(this).setSelection(position, position);}$.fn.setSelection = function(selectionStart, selectionEnd) { if(this.lengh == 0) return this; input = this[0]; if (input.createTextRange) { var range =... 阅读全文
posted @ 2012-12-05 10:52 '.Elvis.' 阅读(343) 评论(0) 推荐(0)
摘要:手动调用一下任何一个(通常是第一个)文本框的focus()方法就可以让所有的文本框恢复神智了。于是写了一个公共脚本,在Iframe内的页面末尾,获取第一个文本框并调用其focus(),经测百来次,再没碰见无法获取焦点的情况,问题解决。 阅读全文
posted @ 2012-12-05 10:39 '.Elvis.' 阅读(661) 评论(0) 推荐(0)