为什么80%的码农都做不了架构师?>>>
1.创建链接<scriptlanguage="javascript">varo=document.body;//创建链接functioncreateA(url,text){vara=document.createElement("a");a.href=url;a.innerHTML=text;a.style.color="red";o.appendChild(a);}createA("/","网页教学网");</script>2.创建DIV<scriptlanguage="javascript">varo=document.body;//创建DIVfunctioncreateDIV(text){vardiv=document.createElement("div");div.innerHTML=text;o.appendChild(div);}createDIV("网页教学网:/");</script>3.创建表单项<scriptlanguage="javascript">varo=document.body;//创建表单项functioncreateInput(sType,sValue){varinput=document.createElement("input");input.type=sType;input.value=sValue;o.appendChild(input);}createInput("button","ooo");</script>4.创建表格<scriptlanguage="javascript">varo=document.body;//创建表格functioncreateTable(w,h,r,c){vartable=document.createElement("table");vartbody=document.createElement("tbody");table.width=w;table.height=h;table.border=1;for(vari=1;i<=r;i++){vartr=document.createElement("tr");for(varj=1;j<=c;j++){vartd=document.createElement("td");td.innerHTML=i+""+j;//td.appendChild(document.createTextNode(i+""+j));td.style.color="#FF0000";tr.appendChild(td);}tbody.appendChild(tr);}table.appendChild(tbody);o.appendChild(table);}createTable(270,270,9,9);</script>