Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"add data"
Bootstrap 4.0.0 Snippet by
lavan
4.0.0
Preview
HTML
View Full Screen
Fork
Fork this
2.2K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> </head> <body> <input type="text" placeholder="studentname" id="sn"> <input type="number" placeholder="studentId" id="si"> <input type="text" placeholder="studentAddress" id="sa"> <input type="date" placeholder="studentjoindate" id="sj"> <input type="date" placeholder="studentupdated" id="su"> <button onclick="add()">Add</button> <table class="table table-bordered" > <thead> <th>Sl.No</th> <th>Std name</th> <th>Std Id</th> <th>Std address</th> <th>Joined Date</th> <th>Std updated</th> <th>Action</th> <tbody id="all"></tbody> </thead> </table> <script> var ary=[] function add() { var one=document.getElementById('sn').value var two=document.getElementById('si').value var three=document.getElementById('sa').value var four=document.getElementById('sj').value var five=document.getElementById('su').value ary.push(lk) alert(ary.length); var lk= document.getElementById('all').innerHTML+="<tr id='allo'><td>"+ary[0]+"</td>"+"<td>"+one+"</td>"+"<td>"+two+"</td>"+"<td>"+three+"</td>"+"<td>"+four+"</td>"+"<td>"+five+"</td>"+"<td>"+"<button onclick='lav(this)'>Edit</button>"+"</td></tr>" document.getElementById('allo').innerHTML+=ary } </script> </body> </html>
Related:
See More
Template
Vue Light Bootstrap Dashboard PRO
131.8K
109
Responsive Data Cards (Bootstrap 4)
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76