2012-01-11 74 views
0

在我看來,我使用jQuery的標籤。最初寄託都爲我工作得很好。但是從點擊標籤-1視圖按鈕(事件)後,當改變它contet,然後再次我使用切換到另一個標籤(比如標籤-2),並通過單擊它回來製表1給出錯誤:: Eror :: jQuery的UI標籤:不匹配片段標識符錯誤:: jQuery用戶界面標籤:不匹配片段標識符


腳本

<script type="text/javascript"> 
    $(function() { 
     $("#tabs").tabs({collapsible:true}); 
    }); 
</script> 

    <script type="text/javascript"> 
    $(function() { 
     $("#button").click(function() { 
      $("#tabs-1").replaceWith($("h1")) 
     }); 
    }); 



查看

<h1>Chenger heading for tab-1 after clicking the button</h1> 
    <div id="tabs"> 
<ul> 
    <li><a href="#tabs-1">Info</a></li> 
    <li><a href="#tabs-2">Address</a></li> 
    <li><a href="#tabs-3">Contacts</a></li> 
</ul> 
<div id="tabs-1"> 
    <table > 
    <tr> 
    <td>First Name</td> 
    <td><%: Model.InfoName%></td> 
    </tr> 
    <tr><td>Last Name</td><td> <%: Model.infoLastName%></td></tr> 
    <tr><td>Fathers Name</td><td> <%: Model.infoFatherName%></td></tr> 
    </table> 
    <input type="button" value="Edit" id="button" /> 
    </div> 


爲什麼我得到這個?????

回答

0

<script type="text/javascript"> $(function() { $("#button").click(function() { $("#tabs-1").replaceWith($("h1")) }); });

+0

爲什麼你說你自己? – Ejaz 2015-07-16 08:56:04

相關問題