jquery中$.get()与thickbox同用时会失效?我用一个页面       $('#<%=xx.ClientID %>').change(function(){
        
        var aa = $(this).val();
        $("#fanwei").empty();
        $.get("WebForm2.aspx",{
                selected:aa  
                },function(data,textStatus){
                $("#fanwei").append(data);
                
                
                });
    
    
    });单独运行这个页面时可以正常使用,但是当在其他页面以thickbox的形式调用这个页面时,这个页面上的其他javascript代码都能正常运行,但是这个$.get()不能取回值了,点了没反应,还请各位高手帮忙解答一下啊,谢谢了啊

解决方案 »

  1.   


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SetAttention2.aspx.cs" Inherits="Jujiao.Zhidao.Web.SetAttention2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
        <script type="text/javascript" src="js/jquery-1[1].3.1.js"></script>
    </head>
    <body>
    <script type="text/javascript">
    var selectValue;
    var selectText;$(function(){
        $('#<%=xx.ClientID %>').change(function(){
            
            var aa = $(this).val();
            $("#fanwei").empty();
            $.get("WebForm2.aspx",{
                    selected:aa  
                    },function(data,textStatus){
                    $("#fanwei").append(data);
                    
                    
                    });
        
        
        })
        
        $('#second').change(function(){
        
        var aa = $(this).val();
         $("#cc").html(aa);
        
        })
        
    })function add()
    {
        
        var b = parseInt($("#hid1").val())+1;
        $("#hid1").val(b);
        var aa = $("#<%=hid2.ClientID %>").val();
        $("#<%=hid2.ClientID %>").val(aa+selectValue+",");
        var htm = "<span id='Show' class='ShowList'><span name=\"tt\" id=\"tt\">"+selectText+"</span><img src=\"images/x.jpg\" onclick=\"javascript:test4('"+selectValue+"','"+b+"');\" /></span>";
        $("#Div1").append(htm);
    }function setValue(obj)
    {
        selectValue=$(obj).val();
        selectText = $(obj).find("option[selected]").text();}function test4(aaa,tt)
        {
           if(confirm("你确认要删除此字段吗?"))
           {
                var bb = parseInt(tt);
                var cc =bb-1;
                $(".ShowList").eq(cc).hide();
                
                $("#<%=hid2.ClientID %>").val($("#<%=hid2.ClientID %>").val().replace(","+aaa+",",","));   
           }
           else
           {} 
        }
    </script>
        <form id="form1" runat="server">
        <div>
            <div class="cen">
       
        
        
        <table width="600" border="1">
      <tr>
        <td height="28" colspan="4">添加关注领域:</td>
      </tr>
      <tr>
        <td width="103" height="123">关注领域:</td>
        <td colspan="3">
        
        <div id="Div1">
                
                    <asp:Repeater ID="Repeater1" runat="server">
                    <ItemTemplate>
                    <span id="Show" class="ShowList"><span name="tt" id="tt"><%# Eval("Title") %> </span><img id="ttyy" name="ttyy" src="images/x.jpg" onclick="javascript:test4('<%# Eval("EvelId2") %>','<%# Container.ItemIndex + 1  %>');" /></span>
                     </ItemTemplate>
                     </asp:Repeater>
                
        </div>
        
        </td>
      </tr>
      <tr>
        <td height="121">关注领域:</td>
        <td width="198"><asp:ListBox ID="xx" runat="server" Height="114px" Width="104px"></asp:ListBox></td>
        <td width="185">&nbsp;<div id="fanwei">
                      </div></td>
        <td width="86"><input id="Button2" type="button" value="button" onclick="add()" /></td>
      </tr>
      <tr>
        <td height="32" colspan="4"><asp:Button ID="Button1" runat="server" Text="确定" OnClick="Button1_Click" />
                <input id="hid1" type="hidden" value="<%= Repeater1.Items.Count %>" />
                <input id="hid2" type="hidden" runat="server" /></td>
      </tr>
    </table>
        
        
        
        </div>
        </div>
        </form>
    </body>
    </html>
    这是WebForm2.aspx的后台代码,前台什么都没有
    [code=C#]
    int selected = ReqUtils.QueryInt("selected", -1);
                string htm = null;
                ISecondEvelBll secondBll = BllFactory.GetBll<ISecondEvelBll>();
                List<SecondEvel> list = secondBll.GetAllSecondEvelList(selected);
                int size = list.Count;
                 htm = "<select id='second' onChange='setValue($(this));' size='" + size + "'>";
                foreach (SecondEvel sec in list)
                {
                    htm += "<option value='" + sec.EvelId2.ToString() + "'>" + sec.Title + "</option>";
                }            htm += "</select>";            Response.Write(htm);
    [/code]