Only one of the two buttons in the div is displayed under IE8. The code is as follows:
<div id="adviceType" style="display: none;" > <select name="adviceTypeOne" id="adviceTypeOne" class="shortselect" > <option value="-1">--请选择--</option> <c:forEach var="bean" items="${listOne }"> <option value="${bean.id }">${bean.des}</option> </c:forEach> </select> <select name="adviceTypeTwo" id="adviceTypeTwo" class="shortselect"> <option value="-1">--请选择--</option> </select> <input type="hidden" id="adviceMsgLogId"> <input id="saveAdviceType" class="retransmission" type="button" value="保存"/> <input id="hideAdviceType" class="retransmission" type="button" value="隐藏"/> </div>
There is really no other way. I plan to [hide] the button without using the button and use the label directly. As a result, the button can be displayed, as shown in the picture:
The final code is as follows:
<div id="adviceType" style="display: none; " > <select name="adviceTypeOne" id="adviceTypeOne" class="shortselect" > <option value="-1">--请选择--</option> <c:forEach var="bean" items="${listOne }"> <option value="${bean.id }">${bean.des}</option> </c:forEach> </select> <select name="adviceTypeTwo" id="adviceTypeTwo" class="shortselect"> <option value="-1">--请选择--</option> </select> <input type="hidden" id="adviceMsgLogId"> <input id="saveAdviceType" class="retransmission" type="button" value="保存"/> <input id="hideAdviceType" class="retransmission" type="button" value="隐藏"/> <span style="color:#ff0000;"><label> </label></span> </div>
just added one line of code. The specific reasons need to be studied.
Code to display div:
$(".left").live("click",function(){ var $this = $(this); var width = $this.width(); $("#adviceType").css("top",event.clientY+$this.scrollTop()) .css("left",event.clientX+$this.scrollLeft()) .css("position","absolute") .show().height(100).width(600);//随着鼠标的点击改变显示位置 })
ajax does not work under IE , other browsers can, but after debugging, I found that there is an extra comma, and IE's inspection is quite strict.