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();
});
});

Karthik ElumalaiRank #544 · 4.5K reputationPosted Jun 20, 2016, 8:05 AM EDT
sai vital186 reputationPosted Jun 20, 2016, 7:45 PM EDT
VikramRank #3,722 · 397 reputationPosted Jan 5, 2019, 1:38 AM EST
Amit KumarRank #459 · 5.4K reputationPosted Jan 5, 2019, 7:48 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts