例如,www.abcd.com里面有个a1是链接到www.456.com的和一个空标签a2。当鼠标移到a1上的时候,状态栏显示www.abcd.com/www.456.com. 当鼠标移到a2上的时候,状态栏显示www.abcd.com
解决方案 »
- 怎么用js永久性的修改页面
- 怎么用juqery跨页面取值··
- <div>内容自动换行了?如何让它不换行?
- 如何得到文本框textarea可见区域显示的字符数?
- 怎么样在网站中添加1个浮动窗口?
- 求救:js中实现拼音和urlencode的功能(qswhU2GB.js) 中文逗号问题
- parentElement怎么只能得到undefind的啊
- 当下拉菜单值改变时,将下拉菜单当前值赋给文本框如何实现?
- 再线求救
- 所有页用一个连接,这个连接放在那里?---up又分
- 当鼠标移到页面中的A标签的时候,如果A是空链接,地址栏显示当前页面地址,如果不是,则显示当前页面地址+链接地址,该怎么写??
- 把1输出为0001
<head>
<script type="text/javascript">function b(sta)
{
window.status =sta;
}
</script>
</head>
<body>
<form name="fm">
<div onmouseover="b('www.abcd.com/www456.com')" onmouseout="window.status=''" style="text-decoration:underline;color:#0000FF;cursor:pointer">www.abcd.com/www456.com</div>
<div onmouseover="b('www.abcd.com')" onmouseout="window.status=''" style=" text-decoration:underline;color:#0000FF;cursor:pointer" onclick="window.location.href='www.abcd.com'">www.abcd.com</div></form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function init(){
var a=document.links;
for(var i=0;i<a.length;i++){
a[i].onmouseover=test;
}
}
function test(){
var h=this.getAttribute("href");
if(h){
window.status=h+"http://www.localhost";
}else{
window.status="http://www.localhost";
}
return true;
}
window.onload=init;
</script>
</head><body>
<a href="http://www.baidu.com">a1</a>
<a href="">a2</a>
</body>
</html>
这样试试