<img> 标签 title 样式改变 大家都用过 img 标签 也知道里面的title 写上文字 就是鼠标移上去后的提示现在我有这样的需求 我要在提示的这段文字中 指定那几个字加粗<img src="" title="说明:abcccn\n;详细 :dkdkdkkd;"/>我要让“说明”和”详细“这些文字变粗img 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 改变不了,你可以写个事件,mouseover的时候show一个div <!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><style type="text/css">#test{ position:absolute; background-color:#CCC; display:none; font-family:Georgia, "Times New Roman", Times, serif;}</style><script type="text/javascript"> function getMousePosition(e){ var a=e||window.event; var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)); var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)); return{ 'x':x, 'y':y } } function init(){ var images=document.images; var div=document.getElementById("test"); for(var i=0;i<images.length;i++){ images[i].onmousemove=function(e){ var title=this.getAttribute("show"); div.style.display="block"; var m=getMousePosition(e); div.innerHTML=title; div.style.left=parseInt(m.x)+5+"px"; div.style.top=parseInt(m.y)+5+"px"; } images[i].onmouseout=function(){ div.style.display="none"; } } } window.onload=init;</script></head><body><div id="test"></div><img src="1.gif" show="test1"></body></html>这样试试 想改的话不如直接加个div来显示 ExtJs4 Grid代码运行报错 跪求帮助 请问 mootools 这个框架的名字是什么意思? 怎样实现垂直滚动条每间隔30秒下拉一屏 如何更改另一个框架中的值 JS注册信息的问题,我不要原码,我想知到该怎么解决我想知道的问题,谢谢了! JS问题请教 高手帮个忙吧~~~~ 提问正则表达式问题 这个问题怎么解决 如何实现文本框输入时的右对齐? EXTJS4 store加载大量数据时,IE提示此页面上的脚本造成Internet Explorer运行速度减慢 jquery 在IE浏览器中无法使用find()或children()遍历xml数据
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#test{
position:absolute;
background-color:#CCC;
display:none;
font-family:Georgia, "Times New Roman", Times, serif;
}
</style>
<script type="text/javascript">
function getMousePosition(e){
var a=e||window.event;
var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
return{
'x':x,
'y':y
}
}
function init(){
var images=document.images;
var div=document.getElementById("test");
for(var i=0;i<images.length;i++){
images[i].onmousemove=function(e){
var title=this.getAttribute("show");
div.style.display="block";
var m=getMousePosition(e);
div.innerHTML=title;
div.style.left=parseInt(m.x)+5+"px";
div.style.top=parseInt(m.y)+5+"px";
}
images[i].onmouseout=function(){
div.style.display="none";
}
}
}
window.onload=init;
</script>
</head><body>
<div id="test"></div>
<img src="1.gif" show="test1">
</body>
</html>
这样试试