<!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; charset=UTF-8"> <tit
先上代码 <script type="text/javascript" language="javascript"> var idTmr; function getExplorer() { var explorer = window.navigator.userAgent; //ie if (explorer.indexOf("MSIE") >= 0) { return 'ie'; }
通过 js 修改 html 的文本内容 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>xiao001</title> </head> <body> <h1>this is a js and html code</h1> <p id = "demo">点击按钮将此处
js在table指定tr行上或下面添加tr行 function onAddTR(trIndex) { var tb = document.getElementById("tb1"); var newTr = tb.insertRow(trIndex);//添加新行,trIndex就是要添加的位置 var newTd1 = newTr.insertCell(); newTd1.