Home > Web Front-end > JS Tutorial > body text

Three ways for js jquery to get server controls with randomly generated IDs_jquery

WBOY
Release: 2016-05-16 17:29:07
Original
1078 people have browsed it

Since the server control will randomly generate the client ID after the ASP.NET web page is run, it is not easy to use jquery to obtain it. I googled it and found the following three methods:

Server control code:

1. $("#").val();

2. $("input[id*=txtUserID]").val();

3. $("*[id$=txtUserID]").val();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!