Я работаю над страницами jsp. У меня есть требования по добавлению текстовых полей при нажатии кнопки.как добавить динамическое текстовое поле при нажатии кнопки
Я не могу написать функцию сценария Java, чтобы добавить текстовое поле на кнопку мыши.
<body>
<button type="button">Add more !</button>
<table id="customers">
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<tr>
<td><input type="text" name="product" value="product.."></input></td>
<td><input type="number" name="quantity" value="quanty.."></input></td>
<td><input type="number" name="price" value="price.."></input></td>
</tr>
// i want to add these fields dynamically on button click.
</table>
</body>
Вы писали: _JavaScript_? – Rayon
Возможный дубликат [Добавление текстового поля при нажатии кнопки с помощью javascript] (http://stackoverflow.com/questions/26227487/adding-textbox-on-button-click-with-javascript) –
@VinothKrishnan Я уже пробовал это. но не работал в моем случае. –