【发布时间】:2015-02-25 10:42:34
【问题描述】:
我最近开始学习 jQuery,并且在编写脚本方面需要帮助 - 我正在这样做作为练习。
我的 HTML 代码如下。
点击按钮我想在表格中创建行并使用 jQuery 从文本框中填充值
<html>
<head>
<scriptsrc="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<script></script>
</head>
<body><br>
First Name<br><input type ="text" id="firstname"></input><br><br>
Employee ID<br><input type="text" id="empid"></input><br><br>
Phone No<br><input type="text" id="phnno"></input><br><br>
<button type="button" id="btnSubmit">Submit</button><br><br><br>
<table id="mytable" border="1" class="tbinput" style="width:30%">
<tr>
<th>Name</th>
<th>EmployeeID</th>
<th>Phone No</th>
</tr>
</table>
</body>
</html>
【问题讨论】:
标签: html html-table