使用javascript动态添加行 [英] Add row dynamically using javascript

查看:79
本文介绍了使用javascript动态添加行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI


我有两个按钮然后完成。如果我点击下一个按钮,生成一行包含下拉列表和checkbox.if我点击完成生成一个包含复选框和输入单选按钮的行。如何在点击按钮时使用javascript动态添加行。

HI
i''ve two button next and finish.if i am click next button that generates a row that contains dropdown and checkbox.if i am click finish that generates a row that contains checkbox and input radio button. how to add a row dynamically using javascript while button click.

推荐答案

你好,



我可以建议你学习jQuery并学习使用jQuery函数创建HTML元素。

在你的情况下使用jQuery你可以在运行时创建表添加或删除行等,并在按钮的click事件上添加新行。
Hi there,

I can suggest you to learn jQuery and learn to create HTML elements using jQuery functions.
Using jQuery in your case you can create table at runtime add or remove rows etc and add new rows on click event of button..


尝试使用它:如果它有效:

http://stackoverflow.com/questions/2228772/dynamically-add-remove-rows-in-table-using-jquery [ ^ ]
Try this if it works:
http://stackoverflow.com/questions/2228772/dynamically-add-remove-rows-in-table-using-jquery[^]


这篇关于使用javascript动态添加行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆