0
我知道這個問題是相當基本的,但我是JQuery的新手,無法鍛鍊解決方案。當點擊cloase圖像時,獲取jquery中的複選框值
當點擊一個圖像的cloase按鈕,即'x'按鈕時,我想從模式窗口中獲取複選框的值。
任何幫助表示讚賞。謝謝..
我加$後,下面的代碼(文件)。就緒(函數(),
$('img#closeImg').on('click', function(){
alert($('.popupContact input[type=checkbox]').val());
下面是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>
嗨Xander感謝您的快速回復......但如果我使用上面的代碼它甚至不loa模態窗口...任何想法爲什麼它這樣做,怎麼辦? – user1127172
hello @ user1127172,我不知道沒有提供整個repro的問題... – xandercoded
我正在加載這個模式窗口onload的頁面...所以當我把上面的代碼只是在$(document).ready (函數()它停止加載模態窗口..是否有意義? – user1127172