js部分
- function sss(ctl,strctl)
- {
- ///js说明 ctl 为了object类型 ,传入当前checkbox的 既this,
- ///strctl 为了 string 型,传入的是要写入的input 控件的值 .列入"Text1";
- var values=ctl.checked;
- var getval=ctl.value;
- if (values==true)
- {
- if (document.getElementById (strctl).value=="")
- {
- document.getElementById (strctl).value=" "+getval;
- }
- else
- {
- document.getElementById (strctl).value=document.getElementById (strctl).value+" "+getval;
- }
- }
- else
- {
- document.getElementById (strctl).value=document.getElementById (strctl).value.replace(" "+getval,"")
- }
- }
- <input id="xx_T_QC_QI__MASSPROVE" type="text" style="width: 563px" readonly="true" />
- <div id="divshow">
- <input id="chk1" onclick='sss(this,"xx_T_QC_QI__MASSPROVE")' name="orginquirybusinfo_syssite" type="checkbox"
- value="ISO9000质量体系认证" />ISO9000质量体系认证
- <input id="chk2" onclick='sss(this,"xx_T_QC_QI__MASSPROVE")' name="orginquirybusinfo_syssite" type="checkbox"
- value="HACCP认证" />HACCP认证
- <input id="chk3" onclick='sss(this,"xx_T_QC_QI__MASSPROVE")' name="orginquirybusinfo_syssite" type="checkbox"
- value="ISO14000环境体系认证" />ISO14000环境体系认证
- <input id="chk4" onclick='sss(this,"xx_T_QC_QI__MASSPROVE")' name="orginquirybusinfo_syssite" type="checkbox"
- value="ISO18000环境体系认证" />ISO18000环境体系认证
- <input id="chk5" onclick='sss(this,"xx_T_QC_QI__MASSPROVE")' name="orginquirybusinfo_syssite" type="checkbox"
- value="其它" />其它
- </div>