如果要在sql里产生,可以这样:
select case 你的字段  when 0 '<input type="checkbox" >'
   else '<input type="checkbox" checked >'
   end

解决方案 »

  1.   

    我想在网页中处理,字段的值 通过bean标记取得
    读取字段的值 被封装在DAO中。
     sherrywang(晶莹雪)你说的 我不懂阿!
      

  2.   

    以http://dev.csdn.net/user/kui中的《Struts复选框的实现》为例.假若从数据库中读取的Bean是da,在Action中给ActionForm赋值,例如:
    if(da.che1==1)
    {
         HelloWordForm.check1="第一项";
    }
    else
    {
         HelloWordForm.check1="";}
    if(da.che2==1)
    {
         HelloWordForm.check2="第二项";
    }
    else
    {
         HelloWordForm.check2="";}