IE8下div中2個按鈕只顯示一個,ie8div按鈕

來源:互聯網
上載者:User

IE8下div中2個按鈕只顯示一個,ie8div按鈕

       IE8下div中2個按鈕只顯示一個,代碼如下:

<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>
       ,只顯示【儲存】按鈕,不顯示【隱藏】按鈕。dom中顯示沒問題,但就是不顯示。

實在沒辦法了,打算把【隱藏】的不使用按鈕,直接用label,結果按鈕可以顯示了,


    最終代碼如下:

<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="隱藏"/><label>&nbsp;</label>    </div>

就加了一行代碼。具體原因待研究。

顯示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);//隨著滑鼠的點擊改變顯示位置})


IE下ajax不起作用,別的瀏覽器可以,調試之後發現多了個逗號,IE檢查還是挺嚴格的。




聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.