『天下软件』强力推出:网页设计-素材、软件、教程下载
网页天地   下载中心   技术文章   建站指南   网页特效   作品展示   留言交流  
全屏显示
打开一个全屏窗口
各种用途的按钮大集合
特殊效果的按钮
让屏幕抖动一阵
 

 ◆全屏显示
说 明 真正的全屏显示,只能用ALT+F4关闭
代 码 <input type="BUTTON" name="FullScreen" value="全屏显示" onClick="window.open(document.location, 'www_helpor_net', 'fullscreen')">

 ◆打开一个全屏窗口
说 明 用按钮打开一个全屏窗口
代 码 <input type="button" onClick="www_helpor_net()" value="试试看" name="button">

<script>
<!--
function www_helpor_net(){
var targeturl="http://www.helpor.net"
newwin=window.open("","","scrollbars")
if (document.all){
newwin.moveTo(0,0)
newwin.resizeTo(screen.width,screen.height)
}
newwin.location=targeturl
}
//-->
</script>


 ◆各种用途的按钮大集合
说 明 各种用途的按钮大集合
代 码 查看源代码
<input TYPE="button" NAME="view" VALUE="查看源代码" OnClick="window.location='
view-source:'+window.location.href" >

返回上一步
<input TYPE="button" VALUE="返回上一步" ONCLICK="history.back(-1)">

刷新按钮一
<input TYPE="button" VALUE="刷新按钮一" ONCLICK="ReloadButton()">
<script language="JavaScript">
<!--
function ReloadButton(){location.href="3.html";}
// -->
</script>

刷新按钮二
<input TYPE="button" VALUE="刷新按钮二" onClick="history.go(0)">

回首页按钮
<input TYPE="button" VALUE="回首页按钮" ONCLICK="HomeButton()">
<script language="JavaScript">
<!--
function HomeButton(){location.href="http://www.helpor.net";}
// -->
</script>

弹出警告框
<input TYPE="button" VALUE="弹出警告框" ONCLICK="AlertButton()">
<script language="JavaScript">
<!--
function AlertButton(){window.alert("今天你喝了没有?:)");}
// -->
</script>

状态栏信息
<input TYPE="button" VALUE="状态栏信息" ONCLICK="StatusButton()">
<script language="JavaScript">
<!--
function StatusButton(){window.status="你好吗?:)";}
// -->
</script>

背景色变换
<input TYPE="button" VALUE="背景色变换" onClick="BgButton()">
<script language="JavaScript">
<!--
function BgButton(){
if (document.bgColor=='#3399ff')
{document.bgColor='#00ccff';}
else{document.bgColor='#3399ff';}
}
// -->
</script>

打开新窗口
<input TYPE="button" VALUE="打开新窗口" ONCLICK="NewWindow()">
<script language="JavaScript">
<!--
function NewWindow(){window.open("http://www.helpor.net","","height=600,width=800,left=10,
top=10,status=no,location=no,toolbar=no, directories=no,menubar=no");}
// -->
</script>


 ◆特殊效果的按钮
说 明 特殊效果的按钮
代 码 <style type="text/css">
<!--
.over {color:yellow; background: navy}
.down {color:yellow; background: navy; font-style: italic}
-->
</style>
<input
type="Button" value="按钮也疯狂" name="Button"
onMouseOver="this.className='over';"
onMouseOut="this.className='';this.value='按钮也疯狂'"
onMouseDown="this.className='down';"
onMouseUp="this.className='over';"
onClick="this.value='我真的好喜欢你!'">

 ◆让屏幕抖动一阵
说 明 让屏幕抖动一阵
代 码 <input onclick="www_helpor_net(2)" type="button" value="地震啦!!!">
<script language="JavaScript">
<!--
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != null) {
parent.main.location.href=form.select1.options[myindex].value;
}
}
// -->
</script>
<script language="JavaScript1.2">
<!--
function www_helpor_net(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
alert(" 没吓坏吧!!! ");
}
// -->
</script>



版权所有©《天下软件》如有任何问题,请联系: xiaojinfa@tom.com
建议使用:800*600分辨率,16Bit颜色、Netscape 4.0、IE 4.0以上版本浏览器浏览本站
本站所有资料和软件仅供学习和研究使用。如有侵犯你版权的,请来信指出,本站将立即改正。