jsp根据参数默认选中radio

       <% int vol = (Integer)request.getAttribute("cardtype") ; %>

       <input type="radio" value="5" id="5"  <%= vol==5?"Checked":"" %> name="appendAmount3" >

       <input type="radio" value="10" id="10" <%= vol==10?"Checked":"" %> name="appendAmount3">

 

原文地址:https://www.cnblogs.com/ydymz/p/8329446.html