< %@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns="http://www.w3.org/1999/xhtml"> < head runat="server"> < title> Untitled Page< /title> < script type="text/javascript"> function table_count(){alert(document.getElementsByTagName("table").length);} < /script> < /head> < body> < form id="form1" runat="server"> < div> < table> < tr> < td> First table < /td> < /tr> < /table> < table> < tr> < td> Second Table < /td> < td> < asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="table_count()" /> < /td> < /tr> < /table> < /div> < /form> < /body> < /html>