网页特效代码大全 求网页特效代码
大家好,今天来为大家解答网页特效代码大全这个问题的一些问题点,包括求网页特效代码也一样很多人还不知道,因此呢,今天就来为大家分析分析,现在让我们一起来看看吧!如果解决了您的问题,还望您关注下本站哦,谢谢~
谁能告诉我一些有用的网页特效代码啊
常用JS代码集锦层的隐藏与显示
只要设置style的display属性即可
比如<div style="display:none" id="MyDiv">隐藏的层</div>
如果要显示它可以通过脚本来控制
window.document.getElementById("MyDiv").style.display="";
禁止右键
<body oncontextmenu="return false">
屏蔽页面中程序运行出错信息
window.onerror= function()
{
return true;
}
得到当前显示器的分辨率
window.srceen.width得到屏幕的宽度
window.srceen.height得到屏幕的高度
如果当前分辨率为800*600,window.srceen.width是800,window.srceen.height是600
定时运行特定代码
setTimeout(Code,Timeout);
setInterval(Code,Timeout);
Code是一段字符串,里边是js代码,Timeout是时间间隔,单位是微秒
setTimeout是从现在算起多少微秒后运行该代码(只运行一次)
setInterval是每隔多少微秒运行一次代码
得到本页网址
var Url= window.location.href;
保存当前页面的内容
document.execCommand("SaveAs","","C:\\index.htm");
隐去浏览器中当鼠标移到图片上跳出的工具栏
<img galleryimg="no">
或者
<head>
<meta http-equiv="imagetoolbar" content="no">
</head>
■打开■
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■另存为■
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■属性■
<input name=Button onClick=document.all.WebBrowser.ExecWB(10,1) type=button value=属性><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■打印■
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■页面设置■
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■刷新■
<input type=button value=刷新 name=refresh onclick="window.location.reload()">
■导入收藏■
<input type="button" name="Button" value="导入收藏夹" onClick=window.external.ImportExportFavorites(true,);>
■导出收藏■
<input type="button" name="Button3" value="导出收藏夹" onClick=window.external.ImportExportFavorites(false,);>
■加入收藏■
<INPUT name=Button2 onclick="window.external.AddFavorite(location.href, document.title)" type=button value=加入收藏夹>
■整理收藏夹■
<INPUT name=Submit2 onclick="window.external.ShowBrowserUI(OrganizeFavorites, null)" type=button value=整理收藏夹>
■查看原文件■
<INPUT name=Button onclick=window.location="view-source:"+ window.location.href type=button value=查看源文件>
■语言设置■
<INPUT name=Button onclick="window.external.ShowBrowserUI(LanguageDialog, null)" type=button value=语言设置>
■前进■
<INPUT name=Submit onclick=history.go(1) type=submit value=前进>
■后退■
<INPUT name=Submit2 onclick=history.go(-1) type=submit value=后退>
网页特效代码
在HTML文件中添加网页特效代码,一般有三种情况。
第一,只加在HTML文件头部,即HTML文件中<head>……</head>之间的代码。这类代码只需要加在这个部分,即可达到预期的效果。
第二,只加在HTML文件体部。即HTML文件中<body>……</body>之间的代码。这类代码只需要加在这个部分,即可达到预期的效果。如在你题目中提到的就属于这一类。
除上述情况外,多数代码需要先在头部(<head>……</head>之间)在上一些属性性质的代码,但是特效的主代码需要添加在体部(body>……</body>之间),否则,特效不能正常显示,有时还会出现错误,影响整个页面的正常显示。
添加特效代码的方法:
先要用HTML编辑软件,如常见的文本编辑器“记事本”,打开需要编辑的文件,根据特效代码的要求,在文件中找到相应位置,复制,粘贴特效代码,保存即可。修改完毕后,即可在浏览器中看到相应的效果。
在添加的时候一定要注意,一定要按照特效源码的要求添加,此外,还要保证源码的完整性,一个标点符号都不能少,也不能多。
另外要说的是,根据我的经验,直接从网上复制来的代码,不一定都能直接粘贴了用,一部分必须通过一个软件来中转。比如,先把网上的代码复制后,粘贴到“记事本”中,然后再复制、粘贴到相应的文件位置上。
最后,介绍你几个经典网页特效站。
1、网页特效集锦:http://www.helpor.net
2、javascript网页特效:http://www.baron.com.cn/javascript
3、万旭网页特效:http://js.wanxu.com
4、网页特效梦工厂:http://www.zlce.net/web
5、网页制作大宝库网页特效大全:http://www.dabaoku.com/texiao
求网页特效代码
有创意,只是目前还不知道脚本里面那个函数控制拖动的~~~~
用表格实现不大可能,但可以虚画一个表格,然后用javascript的层定位技术应该可以实现的,
不知道你用来做什么的?
不过第一次看到这中问题,我可以尝试一下
哈哈,效果出来了。看看下面的效果,另存为.htm就可以看到效果了。是否为你要的效果呢?
点一下图片就可以拖动了,在点一下图片停止拖动。(注:拖动的时候不需要一直点住图片)
<html>
<head>
<title>shiyan</title>
<style
type='text/css'id='defaultPopStyle'>
*{
margin:5px.;padding:0;
}
.cPopText
{
left:200;
background-color:
#ff5555
;color:
#ffffff
;
border:10px
solid
#3333cc;
margin:10px;solid:#aa0000;bordercolor:
#000000;font-size:
18px;height:
40px;
padding-right:
10px;
padding-left:
10px;
padding-top:
4px;
padding-bottom:
4px;
}
#feixue{
text-align:center;font-size:14pt;color:#2222ff;}
</style>
<script
language="javascript">
kk=-1
function
ss(dypopLayer)
{
if(kk==1)
{
dypopLayer.style.visibility="visible"
MouseX=event.x;
MouseY=event.y;
dypopLayer.style.left=MouseX+document.body.scrollLeft-50;//使得鼠标在图片上
dypopLayer.style.top=MouseY+document.body.scrollTop-50;//使得鼠标在图片上
}
}
function
s2()
{
dypopLayer.style.visibility="hidden"
}
</script>
</head>
<body>
<h2>shiyan</h2>
<div
id="feixue">我的样式</div>
点一下图片就可以拖动了,在点一下图片停止拖动。(注:拖动的时候不需要一直点住图片)
<br>
<div
id='dypopLayer'
align="center"
style='position:absolute;z-index:1000;visibility:visibility'
class='cPopText'
onMouseDown="kk=kk*(-1)"
onmousemove=ss(dypopLayer)>
i
love
you<br><img
src="dansh2.jpg"
alt="图片"
width="150"
height="130"></div>
<div
id='dypopLayer2'
align="center"
style='position:absolute;z-index:1000;visibility:visibility'
class='cPopText'
onMouseDown="kk=kk*(-1)"
onmousemove=ss(dypopLayer2)>
i
love
you<br><img
src="dansh2.jpg"
alt="图片"
width="150"
height="130"></div>
<div
id='dypopLayer3'
align="center"
style='position:absolute;z-index:1000;visibility:visibility'
class='cPopText'
onMouseDown="kk=kk*(-1)"
onmousemove=ss(dypopLayer3)>
i
love
you<br><img
src="dansh2.jpg"
alt="图片"
width="150"
height="130"></div>
<br>
<br>
</body>
</html>
if
do
it
According
to
what
you
mean~~!
i
think
that
must
be
a
big
system,and
the
question
should
not
be
find
in
here~!?
maybe
you
should
find
a
Software
companie
to
solve
it.
about
you??
感谢您的阅读!希望本文对解决您关于网页特效代码大全的问题有所帮助。如果您还有其他疑问,欢迎随时向我们提问。