求问如何为网页下多个DIV添加编辑框 需求不明确,先想明白,到底要做啥? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head> <title>测试</title> <script type="text/javascript" src="jquery1.9.1.js"></script> <script type="text/javascript"> $(function () { //$(".rela").on("mouseout",".show", function () { // $(this).remove(); //}); $(".rela").hover(function () { var obj = "<div class=\"show\"></div>"; $(this).children(".show").remove(); $(this).append(obj); }, function () { $(this).find(".show").remove(); }); //$(".show").hover(function () { }, function () { alert(""); $(this).remove();}); }); </script> <style type="text/css"> .rela { position: relative; display: block; } .keshi { cursor: pointer; display: block; } .show { position: absolute; background: #000; width: 100%; height: 100%; text-align: center; top: 0px; left: 0px; opacity: 0.8; } .show a { color: red; } li { width: 200px; float: left; margin-left: 12px; line-height: 24px; height: 20px; } </style></head><body> <div style="width: 310px; height: 467px; border: 1px solid red;" class="rela"> </div> <div style="width: 310px; height: 467px; border: 1px solid blue;" class="rela"> </div> </body></html>你运气好才弄没几天,兼容没测。。 点击查看演示代码,是需要这样的效果吗? 谁有。用Javascript计算日期加小时的原代码? 请教js如何实现让table的表头的高度固定? 如何让IE不缓存JS文件 帮我写个计数器,菜鸟真的给你们跪下了,好几天了都解决不了呀?在线等...... js中关于new ActiveXObject 正则问题--怎么让数字串只有2、3、5三种数字 javascript如何用正则表达式匹配“*/”? 请大虾帮我看看 急急!!!!!!请大家帮帮忙!!!!100分 如何用javascript得到二个时间之间的天数,请代码示例. 一段javascript脚本的解析 hover闪烁
<html>
<head>
<title>测试</title>
<script type="text/javascript" src="jquery1.9.1.js"></script>
<script type="text/javascript"> $(function () { //$(".rela").on("mouseout",".show", function () {
// $(this).remove();
//});
$(".rela").hover(function () {
var obj = "<div class=\"show\"></div>";
$(this).children(".show").remove();
$(this).append(obj);
}, function () {
$(this).find(".show").remove();
});
//$(".show").hover(function () { }, function () { alert(""); $(this).remove();});
});
</script>
<style type="text/css">
.rela {
position: relative;
display: block;
} .keshi {
cursor: pointer;
display: block;
} .show {
position: absolute;
background: #000;
width: 100%;
height: 100%;
text-align: center;
top: 0px;
left: 0px;
opacity: 0.8;
} .show a {
color: red;
} li {
width: 200px;
float: left;
margin-left: 12px;
line-height: 24px;
height: 20px;
}
</style>
</head>
<body>
<div style="width: 310px; height: 467px; border: 1px solid red;" class="rela">
</div>
<div style="width: 310px; height: 467px; border: 1px solid blue;" class="rela">
</div>
</body>
</html>你运气好才弄没几天,兼容没测。。