How to Add Date Time dynamically using Jquery
Medical History V1.0 101-001
Title: Section I. Personal History
| Diagnosis: | Date of Diagnosis: | Comments: | |
|---|---|---|---|
Title: Section II. Family History
Please select the family member from the provided drop-down and then provide additional details.
| Member: | Diagnosis: | Date of Diagnosis: | Comments: | |
|---|---|---|---|---|
var x = 1;
$(document).ready(function () {
$("#dtBox").DateTimePicker();
$("#btnadd").click(function () {
x = x + 1;
var text = '' '
+ '' '
+ '
+ ''
+ ''
+ ''
+ ''
+ ''
+ ''
+' '
+ ''
+ ''
+ ''
+ ''
+ ''
+ ''
+ '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '
$("#table1").append(text);
})
$("#table1").on('click', "#btnremove", function () {
$(this).closest('tr').remove();
});
$("#btnadd1").click(function () {
x = x + 1;
var data = '' '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '' '
+ ''
+ '
+ '
$("#table2").append(data);
})
$("#table2").on('click', "#btnremove1", function () {
$(this).closest('tr').remove();
});
});
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Amit KumarPosted Jan 5, 2019, 12:48 PM
VikramPosted Jan 5, 2019, 6:38 AM
sai vitalPosted Jun 20, 2016, 11:45 PM
Karthik ElumalaiPosted Jun 20, 2016, 12:05 PM