2
叫我使用jQuery UI的選項卡和工具提示的時候,它的工作原理perfectly.Heres代碼爲jQuery的UI選項卡微軟JScript運行時錯誤:預期的對象拋出從代碼隱藏
$(function() {
$("#tabs").tabs();
$(document).tooltip();
});
我寫的,我想另一個函數從後面的代碼調用按鈕單擊事件
function setDiv(type){
alert(type);
}
繼承人我的代碼隱藏功能。
protected void btnNext_Click(object sender, EventArgs e)
{
pnlResult.Visible=True;
ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "script type='text/javascript' language='javascript'",
"setDiv('highlight')();", true);
}
問題是,當我點擊btnNext按鈕,警報說亮點是,我在
<div id="tabs-1">(div used for creating tabs)
得到對象預期的錯誤 aspx頁面和錯誤點上showing.After這裏是我的aspx頁面
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">//Here's where i am getting the error
<p>
<asp:Panel ID="pnlResult" runat="server" Visible="false">
<div id="divResult" runat="server">
<span id="spIcon" style="float:left;margin-left:3px;"></span>
Successfully inserted
</div>
</asp:Panel>
<table style="width:50%" id="tbl" runat="server" >
<tr>
<td>
Your Name:
</td>
<td>
<input id="name" title="Enter your name here" />
</td>
</tr>
<tr>
<td >
<span class="ui-icon ui-icon-alert" style="float:left;margin-left:3px;"></span>
<input type="button" id="btnSubmit" value="Submit" />
</td>
</tr>
</table>
</p>
</div>
<div id="tabs-2">
<p>Tab2.</p>
</div>
<div id="tabs-3">
<p>Tab3.</p>
<p>Tab is placed.</p>
</div>
</div>
感謝您的reply.now我得到語法錯誤,當我檢查errorconsole(火狐)它顯示以下行**