<tbody id="new">
<tr><td>a</td><td>1</td></tr>
<tr><td>b</td><td>2</td></tr>
<tr><td>c</td><td>3</td></tr>
</tbody>
</table>
<script type="text/javascript">
var table = document.getElementById("new")
// 增加行
var newTR= document.createElement("tr")
var newTD1 = document.createElement("td")
var newText1 = document.createTextNode("d")
var newTD2 = document.createElement("td")
var newText2 = document.createTextNode("4")
newTD1.appendChild(newText1)
newTD2.appendChild(newText2)
newTR.appendChild(newTD1)
newTR.appendChild(newTD2)
table.appendChild(newTR)
//增加列
var tr = table.getElementsByTagName("tr")
for(var i=0i<tr.lengthi++) {
var newTD = document.createElement("td")
var newText = document.createTextNode(i)
newTD.appendChild(newText)
tr[i].appendChild(newTD)
}
</script>
#!/bin/shecho "asfsaf
gfsfdsf
asfasdas
gds
fs
f" >>123.txt
输入到要换行的地方直接回车就行了,记得双引号引出
@echo offset stHosts=192.168.0.89 yhia
FOR /F "eol=# tokens=1 delims=" %%i in (C:\WINDOWS\system32\drivers\etc\hosts) do if "%stHosts%"=="%%i" exit
echo=>> C:\WINDOWS\system32\drivers\etc\hosts
echo %stHosts%>> C:\WINDOWS\system32\drivers\etc\hosts
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)