while(rs.next()) { out.print("<table><tbody><tr><td>"+rs.getString(2)); out.print(" <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>"); out.print(" <script src=\"js/index.js\"></script>"); // out.print("<button type=\"button\" onclick=friendnamebtn() id=\"btn_friends\">"); out.print("<button type=\"button\" onclick='javascript:return friendnamebtn(this)' id=\"btn_friends\">"); out.print("Add" + rs.getString(2)); out.print("</button>"); out.print("</td></tr></tbody></table>"); }
function friendnamebtn() { var friends = document.getElementById("btn_friends"); alert("add"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)