繁体   English   中英

目录列表随机显示在对话框的jQuery UI选项卡中

[英]Directory Listing randomly shows up in a jQuery UI tabs inside a Dialog

我想在对话框中显示jQuery UI选项卡,但是它无故显示了我的asp.net应用程序的目录列表。 它还会更改我页面的CSS。 这里发生了什么?

屏幕截图

使用Javascript:

$("#editAddress").click(function () {
        var personId = window.location.search.slice(1).split('=')[1];
        //Use Get API to fill the form:
        $.getJSON('/ipad/api/Address/' + personId, function (data) {
            var tabs = $('#tabs');
            $("#dialogAddress").empty().append(tabs);
            $("#dialogAddress").dialog("open");
            tabs.show();
            tabs.tabs();
        });    
    });

HTML:

<div id="tabs" style="display:none">      
      <ul>
        <li><a href="#tabs-1">Tab 1</a></li>
      </ul>
      <div id="tabs-1">
        <fieldset>
        <label for="address1">
            Address1:</label>
            <input type="text" name="address1" id="address1" value="" />
        <label for="city">
            City:</label>
            <input type="text" name="city" id="city" value="" />
        <label for="country">
            Country:</label>
             <input type="text" name="country" id="country" value="" />
        </fieldset>
      </div>
</div>

这可以通过在隐藏代码中设置超链接href来解决。 使用ASCX(用户控件)时出现此类问题。

我从这里得到解决方案: asp.net用户控件,让htmlAnchor解析为href =“#”

希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM