加入收藏夹代码
<a href="javascript:window.external.AddFavorite('http://url/','站点名称')" >
ie地址栏图标
<link rel="icon" href="favicon.ico" type="image/x-icon" /><link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
把名为 favicon.ico 大小 16X16 的图标放到网页的根目录
长度自适应的div
嵌套DIV:父DIV的高度不能根据子DIV自动变化的解决方案<div id="parent"> <div id="content"> </div></div>当Content内容多时,即使parent设置了高度100%或auto,在不同浏览器下还是不能完好的自动伸展。 解决方案<div id="parent"> <div id="content"></div> <div style="font: 0px/0px sans-serif;clear: both;display: block"> </div><!--here--></div>在层的最下方产生一个高度为1的空格,可解除这个问题
JAVA容错代码
一些网页用了JAVA程序时容易出现脚本错误,下面就是为解决次问题而从网上搜索而来的代码,希望对你有用!
<SCRIPT LANGUAGE="JavaScript"><!-- Hide
function killErrors() {return true;}
window.onerror = killErrors;
// --></SCRIPT>
本文一些代码来自www.pjhome.net
推荐阅读
WebGame《逆转裁判》完整版 代码下载(1月24日更新)
特别提醒:您可以自由下载并更改代码,欢迎所有有志于WebGame领域的朋友给我写信或到我的Blog上留言。 演示地址:http://nzcp.gbq.cn/screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.st>>>详细阅读
本文标题:做网页的一些技巧
地址:http://www.17bianji.com/kaifa2/JS/31016.html
1/2 1