0

我正在尝试在具有链接主题定义的链接上创建一个弹出窗口。我不想使用警告图标的 javascript alert 。我使用了 window.createpopup 但它不适用于 IE 以外的其他浏览器。在 javascript 或 jquery 中是否有任何其他功能用于创建带有信息文本的弹出窗口,这就是我在我的页面中拥有的

               <script type="text/javascript" src="/javascript/jquery/jquery-ui-                                                                                            1.8.17.custom.min.js"></script>
             <script type="text/javascript" src="/javascript/jquery/jquery-ui-1.10.3.custom.min.js"></script>
              <script type="text/javascript" src="/javascript/jquery/jquery-ui-1.10.3.custom.js"></script>
          <script type="text/javascript" src="/javascript/jquery/jquery-ui.js"></script>
            <script type="text/javascript" src="/javascript/jquery/charCount.js"></script>
               <link rel="stylesheet" type="text/css" href="/javascript/jquery/css/smootheness/jquery-ui-1.10.3.custom.css"/>
                   <link rel="stylesheet" type="text/css" href="/javascript/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css"/> 

    $(document).ready(function () {
        $('#PopupExposure').dialog({ autoOpen: false });
        $('#Exposurepopup').click(function () {
            $('#PopupExposure').dialog('open');
        });
        $('#PopupStatus').dialog({ autoOpen: false });
        $('#Statuspopup').click(function () {
            $('#PopupStatus').dialog('open');
        });
        $('#PopupFunction').dialog({ autoOpen: false });
        $('#Functionpopup').click(function () {
            $('#PopupFunction').dialog('open');
        });
        $('#PopupEffect').dialog({ autoOpen: false });
        $('#Effectpopup').click(function () {
            $('#PopupEffect').dialog('open');
        });
        $('#PopupResearch').dialog({ autoOpen: false });
        $('#Researchpopup').click(function () {
            $('#PopupResearch').dialog('open');
        });
        $('#PopupProgram').dialog({ autoOpen: false });
        $('#Programpopup').click(function () {
            $('#PopupProgram').dialog('open');
        });
        $('#PopupPolicy').dialog({ autoOpen: false });
        $('#Policypopup').click(function () {
            $('#PopupPolicy').dialog('open');
        });
    });
</script>

       <asp:ScriptManagerProxy ID="ScriptManagerproxy1" runat="server">
        </asp:ScriptManagerProxy>
      <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
             <ContentTemplate>
          <div id="studysub_animal" runat="server">
                        <asp:Label ID="lbl_studysubj" CssClass="questions" runat="server" AssociatedControlID="rdb_studysubj"
                            Text="1. Select the study subject."></asp:Label><span class="red">*</span>

                        <asp:RadioButtonList ID="rdb_studysubj" runat="server" OnSelectedIndexChanged="rdb_studysubj_SelectedIndexChanged"
                            AutoPostBack="True" ValidationGroup="UserProfile">
                            <asp:ListItem Value="Humans">Humans</asp:ListItem>
                            <asp:ListItem Value="Non-Human primates">Non-Human primates</asp:ListItem>
                            <asp:ListItem Value="Rodents">Rodents</asp:ListItem>
                            <asp:ListItem Value="Others">Others</asp:ListItem>
                        </asp:RadioButtonList>                            
                    </div>

        <div id="bimarkerinterest" runat="server">
                        <asp:Label ID="Label1" CssClass="questions" runat="server" AssociatedControlID="rdb_biomarkerinterest"
                            Text="1.Select the Biomarker of interest."></asp:Label><span class="red">*</span>
                        <asp:RadioButtonList ID="rdb_biomarkerinterest" runat="server" AutoPostBack="true"
                            OnSelectedIndexChanged="rdb_biomarkerinterest_SelectedIndexChanged">
                            <asp:ListItem Value="Exposure"><a id="Exposurepopup">Exposure</a></asp:ListItem>
                            <asp:ListItem Value="Status"><a id="Statuspopup">Status</a></asp:ListItem>
                            <asp:ListItem Value="Function"><a id="Functionpopup">Function</a></asp:ListItem>
                            <asp:ListItem Value="Effect"><a id="Effectpopup">Effect</a></asp:ListItem>
                        </asp:RadioButtonList>

                    </div>

              <div id="PopupExposure" title="Exposure Definition" style="display:none;"><p>Distinguishing dietary insufficiencies from responses to chronic health conditions\nDetermining the level of intake for a specific nutrient for a group or community and the needs/risks associated with that level</p></div>
              <div id="PopupStatus" title="Status Definition" style="display:none;"><p>Explaining how a person or group of people compare to accepted standards of nutrition.\n Guiding actions related to these standards, such as providing supplementation.</p></div>
              <div id="PopupFunction" title="Function Definition" style="display:none;"><p>Identifying the role of specific nutrients in biological systems.\nIdentifying potential interactions amongst different nutrients in biological systems.\nIdentifying the role for nutrients at different stages of the life span and under different physiological states, e.g., pregnancy.</p></div>
                <div id="PopupEffect" title="Effect Definition" style="display:none;"><p>Assessing the direct impact of nutrient status (i.e., adequacy, deficiency or excess of nutrient.\nEvaluating the impact of an intervention, to include the impact of \n1) a nutritional intervention or \n2) the impact of a non-nutritive intervention, e.g., a drug, on nutrient status or function.</p></div>
                <div id="PopupPolicy" title="Policy Definition" style="display:none;"><p>Refers to the evaluation and use of the extant evidence to support:\n 1) the development of new guidance or policy about diet and health,\n 2) funding agencies making decisions about either the quality of funding applications or the identification of research priorities in food and nutrition,\n 3) donor agencies making decisions about priority areas of need.\nPolicy makers, as data consumers, need a level of confidence in those data to support the generation of evidence-based policy.\n The QBS will better allow them to interpret the literature and help support efforts to determine priority areas of need.</p></div>
                 <div id="PopupProgram" title="Program Definition" style="display:none;"><p>Refers to public health activities, i.e., at community, national, regional or global level, intended to address population based needs through evidence-based interventions.\nThe support for the development, monitoring and evaluation of such activities includes data from surveillance to identify populations at risk.\nThe QBS is intended to support those who are involved in any activity designed to support the development, implementation, monitoring or evaluation of public health interventions</p></div>
                <div id="PopupClinical" title="Clinical Definition" style="display:none;"><p>The context within which nutritional status is assessed to support health promotion, disease prevention or treatment of specific conditions.\n The QBS is intended to improve clinicians’ ability to diagnose, monitor and improve patient status and response to treatment</p></div>
                <div id="PopupResearch" title="Research Definition" style="display:none;"><p>BOND uses an inclusive definition of research that encompasses a continuum of activity from basic/bench research involving studies at a cellular/molecular level utilizing cell cultures or non-human animal models to clinical studies in humans and population-based (surveillance/epidemiology) research.\nThe QBS provides the state of the science with regard to the range of biomarkers available for a given use and is designed to be accessible to users irrespective of their level of nutritional expertise.</p></div> 
4

1 回答 1

0

jQuery 的对话框可能是您正在寻找的:

http://jqueryui.com/dialog/

编辑:这是一个演示,展示了一个工作示例:jsFiddle

HTML:

<a href="#" id="triggerDialog">Show Dialog</a>
<div id="dialog" style="display:none;">Some text</div>

jQuery:

$(function() {

    // Create the dialog and make it hidden initially
    $('#dialog').dialog({ autoOpen: false });

    // When the link is clicked, open the dialog
    $('#triggerDialog').click(function() {
        $('#dialog').dialog('open');    
        return false;
    });

});

编辑:确保包含 jQuery、jQuery UI 和 jQuery UI 样式表之一。您可以在 jQuery 的 CDN 站点上找到所有这些文件的链接:

http://codeorigin.jquery.com/

于 2013-08-28T15:08:50.077 回答