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