动态生成标签(多重).docVIP

  • 7
  • 0
  • 约5.31千字
  • 约 5页
  • 2017-01-30 发布于重庆
  • 举报
动态生成标签(多重)

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN /TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=/1999/xhtml head title new document /title script type=text/javascript !-- //驾驶证数组 var jszs=[A1,A2,A3,B1,B2,C1,C2,C3,C4,D,E,F,M,N,P]; //增加节点 var count=0; function addEles(){ count+=1; var table=document.getElementById(t1); var tr=document.createElement(tr); //car style var td_kclx_1=document.createElement(td); td_kclx_1.innerText=car style; var td_kclx=document.createElement(td); var text_kclx=document.createElement(input); text_kclx.setAttribute(type,text); text_kclx.setAttribute(id,kclx_+count); text_kclx.setAttribute(name,kclx_+count); text_kclx.setAttribute(onblur,checkJsz(this)); var span_kclx=document.createElement(span); span_kclx.innerText= | ; td_kclx.appendChild(text_kclx); td_kclx.appendChild(span_kclx); //students amount var td_xysl_1=document.createElement(td); td_xysl_1.innerText=students amount; var td_xysl=document.createElement(td); var text_xysl=document.createElement(input); text_xysl.setAttribute(type,text); text_xysl.setAttribute(id,xysl_+count); text_xysl.setAttribute(name,xysl_+count); text_xysl.setAttribute(onkeyup,checkInt(this)); var span_xysl=document.createElement(span); span_xysl.innerText= | ; td_xysl.appendChild(text_xysl); td_xysl.appendChild(span_xysl); //night test var td_night_1=document.createElement(td); var span_night_1=document.createElement(span); span_night_1.innerText=is night test :; td_night_1.appendChild(span_night_1); var text_night_1=document.createElement(input); text_night_1.setAttribute(type,checkbox); text_night_1.setAttribute(id,sfyk_+count); text_night_1.setAttribute(name,sfyk_+count); text_night_1.setAttribute(onchange,showHide(this)); td_night_1.appendChild(text_night_1); var td_night=document.createElement(td); td_night.setAttribute(id,yk_+count); td_night.setAttribute(style,display:none;); var sp

文档评论(0)

1亿VIP精品文档

相关文档