smarty变量调节器案例

时间:2023-12-19 19:09:08

要求:

如下图,有内容的每一行,当鼠标放上去显示灰色区域,当鼠标离开灰色区域消失

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAxQAAACxCAIAAADS2GwGAAAgAElEQVR4nO2dy2HjOgwAXY2v6cM9uAX34YMb8cmF5Kh+8g6yJH4AEoToMNo3c9pYP4rOghMQok4/AAAAAGDmNLoBAAAAAEcCeQIAAABoAHkCAAAAaAB5AgAAAGgAeQIAAABoAHkCAAAAaAB5AgAAAGhAk6fX9XT6uk/hR9P96/oKfgg2v66nbdPP63oKf4xPMZ91/UeyUTnOw3T/Op2sJ0yuHfyo34y1BW/KJ3ldDTt1pal/AAAAYEGRp2makuF8/vH90+t6Op2+rq/p5+c9Ci8/LFtr8jRN2W7T9JrH86/7lIiHhElGTpkCyrebeNv28zRNc1Oy09RbaLlyeqraMfWr2oyorX8AAABgpTxtt+SfXtdgRJ5l6T3kRj8ER83mYRrpk8O3a6kSJqTFIubrrueoukSW88qTYHlbpORZeUOpsfMB9dZW03OW/F1r/wAAAMCGoeapzZx+TJknE9reZT+IUmQ/kSkUjoivYzWQ3fKUNa7W2v3y1N4/AAAAEGAqGM+NKZapZOgN5WmbHnLMMMkWpijb1hpZ51ShEa5i8Z95n5ctudbUqlJr98mTq38AAAAgRJQnYQCOh9fop8Cfknm6r/sUZ3USKUktKx3zZYdRJu00MZDvIL/XquYlsrcv85Tmf6w34695cvYPAAAAxMjytJSLp2U/sfhsP8Xm48k8vV4v4YEzyUPk5wAFZRAOni8RfKg8cva+RlGD3PKUNaJlR1fmyd8/AAAAkFKatqvVZZeOC+XJlHnaPklLgKImyLXdaqpFan6QYlnUTpKn66usQS55CqccK0mkaC9/SdKu/gEAAIAM2yKZhiktZZ2nRnmSLx0ntYpiUhIv+dSFkiejPHVctKCM8elF0Qcd/QMAAAACdnkqDLvJ5j0F4/mIHnxSfq6+VQ7eK3sK8rR81CBP+oU6Oop1GdFCoT3yBAAAsJPatJ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0UEYAI7H6LjlBHkCgD6MDsIAcDxGxy0nyBMA9GF0EAaA4zE6bjlBngCgD6ODMAAcj9FxywnyBAB9GB2EAeB4jI5bTpAnAOjD6CAMAMdjdNxygjwBQB9GB2EAOB6j45YT5AkA+jA6CAPA8Rgdt5wgTwDQh9FBGACOx+i45QR5AoA+jA7CAHA8RsctJ8gTAPRhdBAGgOMxOm45QZ4AoA+jgzAAHI/RccsJ8gQAfRgdhAHgeIyOW06QJwDow+ggDADHY3TccoI8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANIA8AQAAADSAPAEAAAA0gDwBAAAANPAfI6RR662suPgAAAAASUVORK5CYII=" alt="" width="508" height="114" />

说明:

循环实现行显示,循环体是一个div,里面放两个div,用js实现效果,获取到该元素,一上来每一行中的灰色区域设置隐藏,添加事件 $(".xs").mouseover(function(){ $(this).children("div").css("display","block"); }) ;

代码:

后台

<?php
include("../init.inc.php");
include("../DBDA.php");
$attr = array(
"淄博汉企优质会员企业与实训结业人员项目交流会希望所有实训人员做好准备,为双方递交一份满意的答卷",
"回答是否该奥会计法安徽打过架哦按时打算答复股群殴我去付钱方法好卡发卡挂靠费啊发送咖啡馆秋风",
"回答是否该奥会计法安徽打过架哦按时打算答复股群殴我去付钱方法好卡发卡挂靠费啊发送咖啡馆秋风"
);
$smarty->assign("shuzu",$attr);
$smarty->display("test1.html");

前台显示:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../config/jquery-1.11.2.min.js"></script>
<title>无标题文档</title>
<script type="text/javascript">
$(document).ready(function(e) {
$(".xs").mouseover(function(){
$(this).children("div").css("display","block");
})
$(".xs").mouseout(function(){
$(this).children("div").css("display","none");
})
});
</script>
</head> <body>
<{foreach $shuzu as $v}> <div class='xs' style='width:500px; height:30px'>
<span><{$v|substr:30:"..."}></span>
<div style='width:300px; height:100px; margin:0px 0px 0px 300px; background-color:#CCC; display:none'><{$v}></div>
</div> <{/foreach}>
</body>
</html>