用javascript动态添加表格的行和列,在android中利用webview布局的话,是必须掌握的,用webview布局其实还是比较容易的快速的 别的不说了,看代码,非常简单 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>js添加表格行列</title> <mce:script type="text/javascript"><!-- function insert(){ var tb=document.getElementById("mytable"); for(var i=0;i<5;i++){ var tr = tb.insertRow(); var td1 = tr.insertCell(0); var td2 = tr.insertCell(1); td1.innerText = "snail"; td2.innerText = "123456"; } } // --></mce:script> </head> <body> <table id="mytable"> <tr> <td width="100">账号</td> <td width="100">密码</td> </tr> </table> <input type="submit" οnclick="insert()" value="添加"/> </body> </html>