概述
控制横向和纵向滚动条的显隐?
<body style="overflow-y:hidden"> 去掉x轴
<body style="overflow-x:hidden"> 去掉y轴
<body scroll="no">不显
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<TD onmouseover="this.style.backgroundColor='#FFFFFF'"
onmouseout="this.style.backgroundColor=''"
style="CURSOR: hand">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<iframe name="name" src="main.htm" width="450" height="287" scrolling="Auto" frameborder="0"></iframe>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<iframe name="pindex" src="index.asp" frameborder=false scrolling="auto" width="100%" height="100%" frameborder=no onload="document.all['pindex'].style.height=pindex.document.body.scrollHeight" ></iframe>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<link rel="Shortcut Icon" href="favicon.ico">
<link rel="Bookmark" href="favicon.ico">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。
<script type="text/javascript">
function doZoom(size)
{document.getElementById('zoom').style.fontSize=size+'px';}
</script>
<span id="zoom">需要指定大小的文字</span>
<a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
在div里加入下面的代码,根据需要调整就可以了。
<iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;">
</iframe>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。
<iframe name="guestbook" src="gbook/index.asp" scrolling=no width="100%" height="100%" frameborder=no onload="document.all['guestbook'].style.height=guestbook.document.body.scrollHeight"></iframe>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<select name="select" onchange="window.open(this.options[this.selectedIndex].value)">
<option value="http://www.microsoft.com/ie"> Internet Explorer</option>
<option value="http://www.microsoft.com"> Microsoft Home</option>
<option value="http://msdn.microsoft.com"> Developer Network</option>
</select>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<param name="wmode" value="transparent">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
添加到收藏夹:
<a href="javascript:window.external.addFavorite('http://链接','说明');">添加到收藏夹</a>
设为首页:
<a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage ('http://链接');>设为首页</a>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<script language=JavaScript>
document.write("最后更新时间: " + document.lastModified + "")
</script>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<Script Language="JavaScript">
var timedate= new Date("October 1,2002");
var times= "国庆节";
var now = new Date();
var date = timedate.getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24));
if (time >= 0)
document.write( "现在离"+times+"还有: "+time +"天")
</Script>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
禁止缓存
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<script language="JavaScript">
<!-- Begin
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
// End -->
</script>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE
<embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=2>滚动信息
</marquee>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
代码“javascript:void(null)”代替原来的“#”标记
文字或图片弹出指定大小的窗口
在body中加入
<script language="JavaScript" type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features) {window.open(theURL,winName,features);}
</script>
弹出代码
<a href="#" target="_self" onClick="MM_openBrWindow('windows01.htm','','width=550,height=380')" width="550" height="380" border="0">图片或文字</a>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
on (press) {
getURL("http://www.makewing.com","_blank");
}
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<meta http-equiv="refresh" content="5;url=http://www.makewing.com">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<hr noshade size=0 color=#C0C0C0>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<td style="word-break:break-all">就搞定了。
完整的是
style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word"
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return
false"onmouseup="document.selection.empty()">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<body oncontextmenu="window.event.returnValue=false"
onkeypress="window.event.returnValue=false"
onkeydown="window.event.returnValue=false"
onkeyup="window.event.returnValue=false"
ondragstart="window.event.returnValue=false"
onselectstart="event.returnValue=false">
</body>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<Body Background="图片文件" bgproperties="fixed">
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<Script Language="JavaScript">
image = new Array(4); //定义image为图片数量的数组
image [0] = 'tu0.gif' //背景图象的路径
image [1] = 'tu1.gif'
image [2] = 'tu2.gif'
image [3] = 'tu3.gif'
image [4] = 'tu4.gif'
number = Math.floor(Math.random() * image.length);
document.write("<BODY BACKGROUND="+image[number]+">");
</Script>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
on (release)
{
loadMovie("1-01.swf", "_root.loaderclip");
}
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
<form id="form1" name="form1" method="post" action="">
<img src="login.gif" width="62" height="22" onclick="document.form1.submit()" />
</form>
![](http://file2.kaopuke.com:8081/files_image/201804/code.gif)
body {
text-align:center;
background-repeat: repeat-y;
background-position: center;
background-image: url(../images/bg.jpg);
}
最后
以上就是傻傻大树为你收集整理的非常好的js代码的全部内容,希望文章能够帮你解决非常好的js代码所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复