『天下软件』强力推出:网页设计-素材、软件、教程下载
网页天地   下载中心   技术文章   建站指南   网页特效   作品展示   留言交流  
给页面加热键
javascript的容错脚本
在页面内登录FTP
彩色滚动条
 

 ◆给页面加热键
说 明 给页面加一个热键,按了它后就自动转到相应页面
代 码

<SCRIPT language="JavaScript">
<!--
var hotkey=97
var destination="http://www.helpor.net";
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function Helpor_net(e){
if (document.layers){
if (e.which==hotkey)
window.location=destination;
}
else if (document.all){
if (event.keyCode==hotkey)
window.location=destination;
}
}
document.onkeypress=Helpor_net;
//-->


</SCRIPT>


 ◆javascript的容错脚本
说 明 javascript的容错脚本,有了它,你的页面就不会出现错误提示了。
代 码 <SCRIPT LANGUAGE="JavaScript">
<!--
function Helpor_net() {
return true;
}
window.onerror = Helpor_net();
// -->
</SCRIPT>

 ◆在页面内登录FTP
说 明 用IE登录FTP服务器。
代 码 <script janguage="javascript">
<!--
function goFtpSite() {
document.location.href = "ftp://" + document.ftp.login.value + ":" + document.ftp.password.value + "@" + document.ftp.url.value;
}

//-->
</script>
<form name="ftp">
<table border="0" cellpadding="1" cellspacing="1" align="center" width="304">
<tr>
<td width="296">
<table border="0" cellspacing=0 cellpadding=5 align="center" width="292">
<tr bgcolor="#b5e1ff">
<td width="75" align="right"> <font face="arial,helvetica" size="-1" color="#008080">
Ftp:// </font> </td>
<td width="193"> <font face="arial,helvetica" size="-1">
<input type="text" size=30 name="url" style="border: 1 solid #0099FF">
</font> </td>
</tr>
<tr bgcolor="#ddf1ff">
<td align="right" width="75"> <font face="arial,helvetica" size="-1" color="#008080">UserName:
</font> </td>
<td width="193"> <font face="arial,helvetica" size="-1">
<input type="text" size="15" name="login" maxlength="20" style="border: 1 solid #0099FF">
</font> </td>
</tr>
<tr bgcolor="#b5e1ff">
<td align="right" width="75"> <font face="arial,helvetica" size="-1" color="#008080">
Password: </font> </td>
<td width="193"> <font face="arial,helvetica" size="-1">
<input type="password" size="15" name="password" maxlength="20" style="border: 1 solid #0099FF">
</font></td>
</tr>
<tr bgcolor="#ddf1ff">
<td colspan="2" align="center" width="280"> <font face="arial,helvetica" size="-2">
<input type=button onclick="goFtpSite();" value="登录" style="background-color: #0099FF; color: #FFFFFF; border: 1 solid #0099FF">

<input type=reset value="重写" style="color: #FFFFFF; background-color: #0099FF; border: 1 solid #0099FF">
</font> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>


 ◆彩色滚动条
说 明 使你的滚动条变成彩色!(IE5.5以下版本无效)
代 码 把以下代码加入到<head>与</head>之间:

<style type="text/css">
body
{
scrollbar-face-color: #b5daff;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #000000;
scrollbar-arrow-color: #0000ff;
scrollbar-base-color: #6699ff;
scrollbar-dark-shadow-color: #6699ff;
}
</style>




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