<!DOCTYPE HTML> <head> <meta charset="UTF-8"> <!--首先创建两个输入框 一个按钮--> <!--然后当点击按钮以后获得 两个输入框里面的值--> <!--三创建出列表的头部--> <!--然后点击按钮后自动创建一行列表--> <!--最后在创建好列表后把两个输入框里面的值在加进去--> <script language="javascript" type="text/javascript"> function click_button() { //alert(document.getElementById("id_name").value); //alert(document.getElementById("id_password").value); document.write('<td class="class_list_content"></td>'); } </script> </head> <body> <div class="div_class_name"> 用户名:<input type="text" id="id_name" value=""> </div> <div class="div_class_password"> 密码:<input type="text" id="id_password" value=""> </div> <div class="div_class_button"> <input type="button" id="id_button" value=" 提交" onclick="click_button()"> </div> <div class="div_class_list"> <table cellSpacing=100> <tr> <th class="class_list_name">用户名</th> <th class="class_list_password">密码</th> </tr> <script language="javascript" type="text/javascript"> document.write("<tr>"); click_button(); document.write("</tr>"); </script> </table> </div> </body> </html>
今天发现个问题我要是想要用循环来解决其实只需要点一次创建一次就可以了 不需要循环来做
今天的问题
就是在创建列表的地方还是有问题创建不出来
今天的单词
[1] vegetable /'ved3itebl/ 蔬菜
[2] vest /vest/ 背心
[3] vine /vain/ 藤