handlebar.js table creation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

handlebar.js table creation

i have to try create table using using handlebar concept.but we have to generate the serial number dynamically so ply guys. <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> </head> <body> <script id="some-template" type="text/x-handlebars-template"> <table class="table"> {{#users1}} <thead> <tr> <th scope="col">row</th> <th scope="col">First Name:</th> <th scope="col">Last Name:</th> <th scope="col">DOB:</th> <th scope="col">Address1:</th> <th scope="col">Address2</th> <th scope="col">Address3:</th> <th scope="col">City</th> <th scope="col">Country:</th> <th scope="col">zip:</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>{{{firstName}}}</td> <td>{{{jobTitle}}}</td> <td>{{{ dob}}}</td> <td>{{{address1}}}</td> <td>{{address2}}</td> <td>{{address3}}</td> <td>{{city}}</td> <td>{{country}}</td> <td>{{zip}}</td> </tr> <tr> <th scope="row">1</th> <td>{{{firstName}}}</td> <td>{{{jobTitle}}}</td> <td>{{{ dob}}}</td> <td>{{{address1}}}</td> <td>{{address2}}</td> <td>{{address3}}</td> <td>{{city}}</td> <td>{{country}}</td> <td>{{zip}}</td> </tr> <tr> <th scope="row">1</th> <td>{{{firstName}}}</td> <td>{{{jobTitle}}}</td> <td>{{{ dob}}}</td> <td>{{{address1}}}</td> <td>{{address2}}</td> <td>{{address3}}</td> <td>{{city}}</td> <td>{{country

24th Sep 2019, 12:48 PM
punithakala purusothamon
punithakala purusothamon - avatar
1 Answer
0
el documento y el formato esta mal hecho te recomiendo que los dividas por divisiones y sections , te ayudara a facilitarlo, cerrar todas las estiquetas es muy importante sin embargo debes de agregar comentarios para que sepas en que estas y en que vas a terminar, darle clases y cunado tengas lista la estructura podras hacer lo demas, empieza con la estructura HTML, luego con sus estilos en CSS y para terminar con JS para darle motor a la pagina, puedes usar jQuery para mas facilidad.
22nd Oct 2021, 5:26 PM
Diego Bautista F.
Diego Bautista F. - avatar