In this lecture, we mainly give a brief introduction to JQuery's selector and how JQuery obtains the value. Without further ado, let’s just post the code and let’s talk based on the DEMO. Copy code The code is as follows: <%@ Page Language="C#" AutoEventWireup= "true" CodeBehind="JQuery2.aspx.cs" Inherits="JQuery_1.JQuery2" %> < ;head runat="server"> <br><script type="text/javascript"> <br>function btnclick() { <br>var t1 = $("#txt1").val(); <br> alert(t1); <br>} <br> <br>$(document).ready(function() { <br>$ ("#btn2").click(function() { <br>var t1 = $("#txt1").val(); <br>alert(t1); <br>}); <br>}) ; <br>