IE与火狐下可以跑.//回车事件处理$(document).keydown(function(event){if(event.keyCode==13){alert($('#idone').val());//回车键盘ISBN获取if($('#idone').val()=='isbn'){//isbncheck();$('#ztm').focus();}elseif($('#idone').val()=='ztm'){$('#bltm').focus();}if($('#idone').val()=='bltm'){$('#ftm').focus();}elseif($('#idone').val...
http://www.jb51.net//article/16059.htm
页面中有一个数据列表,是table,放在一个div窗口中,结构如下:[code]<body><divid="container"><tableid="grid">....列表数据....</table></div></body>[/code]给container设置了样式#container{width:100%;margin:10px;}给grid设置了样式#grid{width:100%}测试结果在IE中正常,在Firefox下container的实际宽度会超过100%而出现横向滚动条,因为Firefox把margin...
http://www.jb51.net//article/15782.htm
在IE下,我们可以轻松使用以下代码来实现设置主页:[html]<aclass="chlnk"style="cursor:hand;font-weight:bold;color:#004080;font-family:Verdana"HREFonClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.jb51.net');">Clickheretomakedevdao.comyourdefaulthomepage!</a>[/html]然而,在firefox下是不行的...
http://www.jb51.net//article/15750.htm
今天用了很久时间终于解决了这个问题,基本完美了,唯一不完美的就是IE6只有在图片完全下载完成后才会自动调整大小,不过聊胜于无,总比进入页面后看到长长的横向滚动条舒服的多,这里使用了expression,但是利用了一次加载,所以expression不会造成内存泄漏。当然,如果你有更好的解决方案,希望能与我交流。代码如下:.Image{max-width:600px;height:auto;cursor:pointer;border:1pxdashed#4E6973;padding:3px;zoom:expression(function(elm){if(elm.width>560){var...
http://www.jb51.net//article/15645.htm
IE直接用:word-break:break-all; /*允许词内换行*/ word-wrap:break-word; /*内容将在边界内换行*/ /*需要注意的默认是:*/ word-wrap:normal /*允许内容顶开指定的窗口边界*/ 而firefox却没有很好的实现办法 ,一个折中方案就是使用滚动条,但网上也提出...
http://www.jb51.net//article/15423.htm
给每一个onClick再附加一个事件 [html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="pragma" content="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=gb2312"&g...
http://www.jb51.net//article/15259.htm
<scripttype="text/javascript"><!--varpreview_page="{?$preview_page?}";varnext_page="{?$next_page?}";varindex_page="{?$index_page?}";vararticle_id="{?$article_id?}";varchapter_id="{?$chapter_id?}";functionjumpPage(){varevent=document.all?window.event:arguments[0]; if(event.keyCode==37)l...
http://www.jb51.net//article/15219.htm
ff下面[code]background-image:url("main_bg.gif"); background-repeat: repeat-y; [/code]必须指定height才能显示但是,大多数情况下都是动态高度于是设置下面的即可[code]overflow:auto; [/code]...
http://www.jb51.net//article/15082.htm
1.window.event兼容脚本 function getEvent(){ //获取浏览器事件,同时兼容ie和ff的写法 if(document.all) return window.event; func=getEvent.caller; while(func!=null){ var arg0=func.arguments[0]; if(arg0){ if((arg0.constructor==Event arg0.constructor&nb...
http://www.jb51.net//article/15080.htm
<img id="img1" src=""/> <script> function fileChange(obj) { var url = obj.value url = "file:///" + url.replace("\\",'/'); alert(url); document.getElementById("img1").src= url; } </scrip...
http://www.jb51.net//article/15060.htm
<img id="img1" src=""/> <script> function fileChange(obj) { var url = obj.value url = "file:///" + url.replace("\\",'/'); alert(url); document.getElementById("img1").src= url; } </scrip...
http://www.jb51.net//article/15059.htm
