嗨,這是我的點擊功能。它適用於Chrome瀏覽器和Firefox,但在IE9上做任何事情。jquery選擇的變化不適用於IE9?
當我點擊dropdownbox時,不要在IE9上運行點擊功能。
腳本:
$('.lstKuralTipleri option').click(function() {
switch ($('.lstKuralTipleri :selected').index()) {
case 0:
$('.SartliFormatDegereGore').slideDown();
$('.SartliFormatTariheGore').slideUp();
break;
case 1:
$('.SartliFormatTariheGore').slideDown();
$('.SartliFormatDegereGore').slideUp();
break;
}
});
.aspx的
<asp:ListBox style="padding-top:3px" runat="server" ID="lstKuralTipleri" CssClass="lstKuralTipleri" Width="805px">
<asp:ListItem Text="> Kolon değerine göre" Selected="True"/>
<asp:ListItem Text="> Tarihe göre"/>
</asp:ListBox>
究竟不起作用???另外,顯示你的HTML可以真正幫助我們幫助你。 – gdoron 2012-04-19 09:02:45
我加了它。點擊功能做工 – Mennan 2012-04-19 09:08:39
有幾件事。首先,使用「更改」而不是點擊。其次,將聽衆放在選擇框上,而不是選項上。 – 2012-04-19 09:10:13