Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- html
- <div id="main"> </div>
- info = ["Hello", "Bye", "Hey Gary"];
- for (i = 0; i < 3; i++){
- document.getElementById('main').innerHTML += "<a id='" + info[i] + "' class='list-group-item'>"+info[i]+"</a>";
- document.getElementById(info[i]).innerHTML += "<input class='btn btn-danger pull-right' class='test77' value='send'>";
- document.getElementById('main').innerHTML += "<br><hr></hr>";
- }
- createbutton();
- function createbutton() {
- $(".test77").click(function () {
- alert("i want to send information at the left");
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement