今日主要进行代码优化处理。
<div class="bigcontent">
<!-- muted:视频内容静音 -->
<%
String adv="";
Connection c=Tool.getConnection();
PreparedStatement pre = null;
ResultSet res = null;
String sql = "SELECT * FROM advert where user_name= ? and id=2";
try {
pre = c.prepareStatement(sql);
pre.setString(1,"111");
//pre.setString(2,tel);
res = pre.executeQuery();
while (res.next()) {
String s1 = res.getString("advert_name");
adv=s1;
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
Tool.release(c, pre, res);
}
if(adv.equals("拼多多官方推广")){%>
<video onm ouseover="play_v1(this)" controls loop muted src="video/se.mp4"></video>
<%}else{%>
<h3>视频广告暂停播放</h3>
<%}
%>
<img alt="" src="images/gg.webp" width='500' height='300' id="im1"/>
<img alt="" src="images/gge.jpg" width='500' height='300'/>
</div>
</div>
<div class="aside" id="aside">
<span id="s">10</span>
<span>秒后关闭</span>
<!-- <img alt="" src="images/mn.jpg" width='300' height='300'/> -->
<a onclick="del()">关闭</a>
</div>