私はこれで立ち往生しています誰でも私を助けることができます...
ここにhtmlがあります
<tr class="appendvalue">
<td colspan="2">
<asp:DropDownList ID="ddlSource" runat="server"></asp:DropDownList>
<asp:TextBox ID="txtSourceValue" runat="server" CssClass="hide" />
<a href="#" class="t12">add static value</a>
</td>
ここにjqueryがあります
$(document).ready(function() {
$('.appendvalue > td > a').live("click", function(e) {
e.preventDefault();
$(this).prev().prev().toggle();
$(this).prev().toggle();
$(this).toggle(function() { $(this).text("select from dropdown"); }, function() { $(this).text("add static value"); });
});
});
最初のクリックの後、ドロップダウンとテキストボックスの切り替えではなく、アンカーテキストの切り替えのみが行われます..