怎么让页面所有a标记在鼠标经过的时候在浏览器右下角显示指定文字? RT 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><a href="#">test1</a><br /><a href="#">test2</a><div id="tip" style="display:none; position:absolute; right:0; bottom:0; background-color:#900; color:#FFF;">你倒底想说什么??</div><script type="text/javascript">var links = document.getElementsByTagName('a');var tip = document.getElementById('tip');for (i = 0; i < links.length; i ++) { links[i].onmouseover = function () { tip.style.display = 'block'; } links[i].onmouseout = function () { tip.style.display = 'none'; }}</script></body></html> <script type="text/javascript">window.status = '你说什么?'; //IE Only</script> 刚刚又测试了一下,window.status在IE、Safari、Opera下有效,Chrome、Firefox下无效。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript">window.status = 'xxx';</script></head><body><a href="#">test1</a><br /><a href="#">test2</a></body></html> IE测试,在鼠标经过A标记内容时还是显示出链接,FF同效果。没办法改就算了,谢谢了。 好吧,再来一个,网上搜的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body onmouseover="window.status='xxx';return true;"><a href="#">test1</a><br /><a href="#">test2</a></body></html> 似乎在哪都是显示XXX。没有办法只有经过A标记才显示xxx的不? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript">window.onload = function() { var a = document.getElementsByTagName('a'); for (i = 0;i < a.length;i ++) { a[i].onmouseover = function() { window.status = 'xxx'; return true; } a[i].onmouseout = function() { window.status = ''; } }}</script></head><body><a href="#">test1</a><br /><a href="#">test2</a></body></html> IE有效果了。不知FF是不是没有办法解决的呢? js 缺少对象是怎么回事 60秒的倒计时牌怎么弄 ul 页面都加载完成了,为何ie的状态栏上的进度条还在处理中? Javascript DIV 有没有人修改过jquery的模块 checkbox返回一个String 拜谢各位,求一正则表达式 菜鸟问题 高手们,帮我看看这段代码 发帖问“hch126163 老胡”一个js的问题,有兴趣的也进来看一下啊 如何删除任意一行?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<a href="#">test1</a><br />
<a href="#">test2</a>
<div id="tip" style="display:none; position:absolute; right:0; bottom:0; background-color:#900; color:#FFF;">你倒底想说什么??</div>
<script type="text/javascript">
var links = document.getElementsByTagName('a');
var tip = document.getElementById('tip');
for (i = 0; i < links.length; i ++) {
links[i].onmouseover = function () {
tip.style.display = 'block';
}
links[i].onmouseout = function () {
tip.style.display = 'none';
}
}
</script>
</body>
</html>
window.status = '你说什么?'; //IE Only
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">window.status = 'xxx';</script>
</head><body>
<a href="#">test1</a><br />
<a href="#">test2</a>
</body>
</html>
没办法改就算了,谢谢了。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body onmouseover="window.status='xxx';return true;">
<a href="#">test1</a><br />
<a href="#">test2</a>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload = function() {
var a = document.getElementsByTagName('a');
for (i = 0;i < a.length;i ++) {
a[i].onmouseover = function() { window.status = 'xxx'; return true; }
a[i].onmouseout = function() { window.status = ''; }
}
}
</script>
</head><body>
<a href="#">test1</a><br />
<a href="#">test2</a>
</body>
</html>