Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击cloase图像时,在jquery中获取复选框值_Jquery_Jquery Ui - Fatal编程技术网

单击cloase图像时,在jquery中获取复选框值

单击cloase图像时,在jquery中获取复选框值,jquery,jquery-ui,Jquery,Jquery Ui,我知道这个问题很基本,但我对JQuery还不熟悉,无法找到解决方案 我想在点击cloase按钮(即图像的“x”按钮)时从模式窗口获取复选框值 感谢您的帮助。谢谢 我在$(document).ready(function())之后添加了以下代码 下面是html代码 <div id="popupScreen"> <div id="popupContact"> <form name="ReportParametersForm" name="Proce

我知道这个问题很基本,但我对JQuery还不熟悉,无法找到解决方案

我想在点击cloase按钮(即图像的“x”按钮)时从模式窗口获取复选框值

感谢您的帮助。谢谢

我在$(document).ready(function())之后添加了以下代码

下面是html代码

 <div id="popupScreen">
    <div id="popupContact">  
    <form name="ReportParametersForm" name="ProcessActionForm" action="<portlet:actionURL>
            <portlet:param name='generateReportAction' value='generateReportAction'/>
            </portlet:actionURL>" method="post" onSubmit="return sendUserFeedback(doNotAsk)"> 
        <img src="<%= renderRequest.getContextPath() %>/NavigationClose.gif" id="closeImg" align="right" onclick="disablePopup()">
        <br/> 
        <p id="contactArea">  
            To help us improve our intranet pages, can you please tell us in about 12 words, what you are accessing this area of the intranet for?  
            <br/><br/>

            <table>
            <tr> 
            <td><input type="text" name="userInput" id="userInput" size="60" onfocus="this.value='';" value="I am trying to find..."/></td>
            <td><input type="submit" name="submitFeedback" value="Send feedback"> </td>
            </tr>
            </table>
            <br/><input type="checkbox" name="doNotAsk" class=""> Please do not ask me for this feedback again
            </form>
    </div>
    <div id="thankYou">  
     <img src="<%= renderRequest.getContextPath() %>/NavigationClose.gif" align="right" onclick="disableNow()">
     <form name="closingForm" name="closingForm"> 
            <h5>Thank you for providing feedback to help us improve Exchange</h5>
            <br/>
            <br/>
            <input type="button" name="Close" value="Close" onClick="disableNow()">
            </form>
    </div>
    <div id="backgroundPopup"></div> 
    <div id="mask"></div> 
    </div>

/NavigationClose.gif“id=“closeImg”align=“right”onclick=“disablePopup()”>

为了帮助我们改进我们的内联网页面,您能否用大约12个字告诉我们,您访问内联网此区域的目的是什么?


请不要再要求我提供此反馈 /NavigationClose.gif“align=“right”onclick=“disableNow()”> 感谢您提供反馈以帮助我们改进交流

  • 将事件附加到id为
    x
    的图像元素
  • 单击时,处理程序会提醒HTML中名为
    modal
    的类的复选框的值

Hi Xander感谢您的快速回复…但如果我使用上述代码,它甚至不讨厌模式窗口…知道它为什么要这样做以及该怎么做吗?hello@user1127172,如果没有提供完整的问题复制,我不知道…我正在加载页面时加载此模式窗口…所以当我在加载完上述代码后$(document).ready(function()它完全停止加载模式窗口..这有意义吗?
 <div id="popupScreen">
    <div id="popupContact">  
    <form name="ReportParametersForm" name="ProcessActionForm" action="<portlet:actionURL>
            <portlet:param name='generateReportAction' value='generateReportAction'/>
            </portlet:actionURL>" method="post" onSubmit="return sendUserFeedback(doNotAsk)"> 
        <img src="<%= renderRequest.getContextPath() %>/NavigationClose.gif" id="closeImg" align="right" onclick="disablePopup()">
        <br/> 
        <p id="contactArea">  
            To help us improve our intranet pages, can you please tell us in about 12 words, what you are accessing this area of the intranet for?  
            <br/><br/>

            <table>
            <tr> 
            <td><input type="text" name="userInput" id="userInput" size="60" onfocus="this.value='';" value="I am trying to find..."/></td>
            <td><input type="submit" name="submitFeedback" value="Send feedback"> </td>
            </tr>
            </table>
            <br/><input type="checkbox" name="doNotAsk" class=""> Please do not ask me for this feedback again
            </form>
    </div>
    <div id="thankYou">  
     <img src="<%= renderRequest.getContextPath() %>/NavigationClose.gif" align="right" onclick="disableNow()">
     <form name="closingForm" name="closingForm"> 
            <h5>Thank you for providing feedback to help us improve Exchange</h5>
            <br/>
            <br/>
            <input type="button" name="Close" value="Close" onClick="disableNow()">
            </form>
    </div>
    <div id="backgroundPopup"></div> 
    <div id="mask"></div> 
    </div>
$('img#x').on('click', function(){
    alert($('.modal input[type=checkbox]').first().val());
});