快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

鼠标移到链接上不在状态栏显示链接的代码

3种状态栏地址链接不显示代码(JS,CSS)

① 状态栏地址链接不显示的JS代码

放在<head>之间

<SCRIPT LANGUAGE="JavaScript">
<!--
function scroll(seed)
{
var m1 = ""
var m2 = ""
var msg=m1+m2;
var out = " ";
var c = 1;
if (seed > 0) {
seed--;
var cmd="scroll(" + seed + ")";
timerTwo=window.setTimeout(cmd,0);
}
else if (seed <= 0 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scroll(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,0);
} else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length-0);
seed--;
var cmd="scroll(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,0);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scroll(0)",7);
}
}
}
rONE=window.setTimeout('scroll(0)',50);
//-->
</SCRIPT>
 

②设置状态栏:

采用css样式表的方法,写法最简单,如在全局style.css文件中加入:

a { cc:expression(window.status='') } 

或在文件头中加入样式:

<style>
a { cc:expression(window.status='') }
</style>

③ 采用JS提交页面,而不是用url的方式,提交方法,当然了,页面可以全部指向中转页面,然后再转至目的页面,为写法方便,可以定义一个页面转向函数:

function openwin(filename) {
window.open(filename,'newwindow','toolbar=no, menubar=no,scrollbars=yes,resizable=no,location=no, status=no');
}
用这个函数打开的页面没有菜單,工具箱,地址欄等

参数解释:

<SCRIPT LANGUAGE="javascript">
window.open 弹出新窗口的命令;
'filename' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
height=100 窗口高度;
width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
</SCRIPT>

参数自己根据需要调调就好用了。

顶(2)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论