Untitled
unknown
plain_text
2 years ago
1.4 kB
7
Indexable
Never
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="/css/addCourse.css"> <title>Document</title> </head> <body> <h3>add course</h3> <div> <label >tên danh sách</label> <input type="text" name = 'name'> </div> <div id = "add"> </div> <br> <button type="button" class="btn btn-primary" id = "signPlus">+</button> <div> <button type = "submit">submit</button></div> <script> window.onload = function() { function addCourse() { console.log('click'); document.getElementById('add').innerHTML ='<br><div><label for="#form-2">tên</label><input type="text"></div>' +'<div><label for="#form-2">Miêu tả</label><input type="text"></div>' +'<div><label for="#form-2">Hình ảnh</label><input type="text"></div>' +'<div><label for="#form-2">Âm thanh</label><input type="text"></div>'; } buttonPlus = document.getElementById('signPlus'); buttonPlus.onclick = addCourse; }; </script> </body> </html>