你好我正在使用此代码发布我的应用程序消息墙上的重要消息,我正在使用复选框在消息墙上发布重要消息。问题在于,在发布重要消息之后,它将再次发布重要消息而不点击复选框,意味着在发布重要消息之后该复选框保持为真。请帮助我。 和我的代码是:需要JavaScript帮助
<div class="checkbox" id="checkboxShow" name="userCheckList1" style="display:block;" onclick="importantChkBoxChange(userCheckListShow.checked);">
<input type="checkbox" name="userCheckList1" id="userCheckListShow" unchecked="unchecked"
onchange="importantChkBoxChange(userCheckList.checked);"/>
</div>
<div class="checkbox" id="checkboxHide" name="userCheckList1" style="display:none;" onclick="importantChkBoxChange(userCheckListHide.checked);">
<input type="checkbox" name="userCheckList1" id="userCheckListHide" unchecked="unchecked"
onchange="importantChkBoxChange(userCheckListHide.checked);"/>
</div>
<span class="fl" style="margin:3px 0px 0 0;" ><@spring.message "label.employee.home.Important"/></span>
及用于此的脚本是:
function importantChkBoxChange(chkBoxStatus){
if(chkBoxStatus == true){
document.forms['messageWallForm'].elements['important'].value="checked";
}else if(chkBoxStatus == false){
document.forms['messageWallForm'].elements['important'].value="unchecked";
}
}
请问您可以开始给您的问题描述性标题。 “需要JavaScript帮助”并不能告诉我们实际的问题。你的三个题目“IE中的jQuery问题”和两个题为“Mozilla Firefox中的JavaScript错误”的问题都没有。 – Bart
@Raman:我想通过格式化和重写这个问题来提供帮助,但是这个问题表达得很差,我甚至不知道要改变它。什么是userCheckList,UserChecklistHide和UserCheckListShow? – mplungjan