ajax与数据库交互
<c:choose>
<c:when test="${user.codeState== 1}">
<input type="radio" name="${status.count }" value="true"
checked="checked" />正常
<input type="radio" name="${status.count }" value="false" />锁定
</c:when>
<c:when test="${user.codeState== 2}">
<input type="radio" name="${status.count }" value="true"
/>正常
<input type="radio" name="${status.count }" value="false"
checked="checked" />锁定
</c:when>
</c:choose>
这段代码的意思是从数据库取值。值为1或者2。取出之后,以radio的形式体现在jsp页面,值为1,则默认选中正常,值为2,则默认选中锁定。
问:以ajax的形式,在修改radio时,弹出是否修改的对话框。例:数据库值为1,jsp页面体现为默认选中可用,现在单击锁定框,弹出对话框,选中确认,则数据库值变为2