Home > Web Front-end > HTML Tutorial > Only one of the two buttons in the div is displayed under IE8_html/css_WEB-ITnose

Only one of the two buttons in the div is displayed under IE8_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:54:06
Original
1236 people have browsed it

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>
Copy after login
As shown in the picture, only the [Save] button is displayed and the [Hide] button is not displayed. It displays fine in the dom, but it just doesn't display.

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>
Copy after login

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);//随着鼠标的点击改变显示位置	})
Copy after login


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.




source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template