希望有人可以用我的代码来帮助我。我正在使用重写的URL并在窗体上放置了这段代码。当页面第一次加载mypage.htm时,默认情况下,type_24复选框被选中。如果他们检查type_12框,我想type_24框取消选中。
我的问题是,如果我检查type_12框,页面刷新和type_12和type_24框被检查..这不是我想要的。我认为这是因为我在我的动作中重新载入了我的重写URL,因为它工作正常,如果我只是将php文件作为动作。
任何想法如何我可以修复我的代码,以便它只有检查type_24时检查type_12?
checked="checked"<?php }?> value="12" onClick="uncheck24(this);" /> 12
checked="checked"<?php }?><?php if(isset($_POST['month_24']) && $_POST['type_24']=="24"){?> checked="checked"<?php }?> value="24" onClick="uncheck12(this);"/> 24 Months
在标题中我有这样的功能:function uncheck12(obj)
{
if (obj.checked == true)
{
document.getElementById("type_12").checked = false;
document.frmrefresh.submit();
}
}
function uncheck24(obj)
{
if (obj.checked == true)
{
document.getElementById("type_24").checked = false;
document.frmrefresh.submit();
}
}