js在table指定tr行上或下面添加tr行 function onAddTR(trIndex) { var tb = document.getElementById("tb1"); var newTr = tb.insertRow(trIndex);//添加新行,trIndex就是要添加的位置 var newTd1 = newTr.insertCell(); newTd1.
JavaScript打印函数myPrint(obj): JavaScript打印页面指定div区域原理:使用window.open()在浏览器打开一个新的页面(window), 使用 window.document.write()将指定div区域的内容写入新窗口文档,document.close()关闭文档,使用window.print()调用打印机打印当前文档. function myPrint(obj){ //打开一个新窗口newWindow var newWindow=window.ope
js 控制展开折叠 div html dom <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;chars