function focusEnd(){ if(field.createTextRange){ var r = field.reateTextRange(); r.moveStart('character',field.value.length); r.collapse(); r.select(); } }
规范帖子中的图片
<img onload='javascript:if(this.width>790)this.style.width=790;' onclick='javascript:window.open(this.src);' style='CURSOR:hand' onmousewheel='return bbimg(this)'> function bbimg(o){ var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%'; return false; }
js文件中的中文问题 web application的编码规则是utf-8,那么js文件中如果有中文就会出现乱码(有可能是其它的页面不正常的情况) 解决这个问题请在引用javascript的地方加上charset="gb2312"或者charset="big5" 例如:<script type="text/javascript" language="javascript" src="scripts/function.js" charset="gb2312"></script>