<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script language ="javascript" > $(document).ready(function (av) { }); function getid(tid) { alert(document.getElementById(tid).previousSibling.id); } </script> </head> <body> <form id="form1" runat="server"> <div id="maincontent"> <div id="frstdiv">this is first div tag</div> <div id="scnddiv" onclick="getid(this.id)">this is second div</div> </div> </form> </body> </html></html>
var divid=document.getElementById('<%=divid.ClientID %>');
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)