当前位置:网站首页>How JQ gets the ID name of an element
How JQ gets the ID name of an element
2022-06-27 05:03:00 【Front cut zz】
html:
<div class="box" id="mybox"></div>
To get the id value , Can pass jquery Of attr() Method .
Examples are as follows :
var idName = $('.box').attr('id')
alert(idName)
Pop up results :

expand :
attr() Method : Used to set or return the attributes and values of the selected element .
alert() Method : Used to display with a specified message and a OK Button warning box .
边栏推荐
- ES6 0622 III
- Microservice system design - service fusing and degradation design
- 【C语言】关键字的补充
- When STM32 turns off PWM output, it is a method to fix IO output at high or low level.
- 系统架构设计——互联网金融的架构设计
- 010 C语言基础:C函数
- Office VR porn, coquettish operation! The father of Microsoft hololens resigns!
- Cognition - how to fill in 2022 college entrance examination volunteers
- 关于元器件封装的一些文章和一下我的体会
- 018 C语言基础:C文件读写
猜你喜欢

Nignx configuring single IP current limiting

微服务系统设计——微服务监控与系统资源监控设计

Learn crypto from Buu (Zhou Geng)

jq怎么获取元素的id名

Microservice system design -- distributed transaction service design

关于元器件封装的一些文章和一下我的体会

Matlab | visualization of mathematical properties related to three interesting circles

微服务系统设计——统一鉴权服务设计

Microservice system design -- unified authentication service design

How pychart installs packages
随机推荐
[station B up dr_can learning notes] Kalman filter 3
009 C语言基础:C循环
Qchart note 2: add rollover display
008 C语言基础:C判断
Installing MySQL on Windows
Matlab | drawing of three ordinate diagram based on block diagram layout
py2neo基本语法
Chapter 2 Introduction to key technologies
halcon常用仿射变换算子
Edge在IE模式下加载网页 - Edge设置IE兼容性
[station B up dr_can learning notes] Kalman filter 2
Advanced Mathematics (Seventh Edition) Tongji University exercises 1-10 personal solutions
Cache comprehensive project - seckill architecture
日志收集系統
What is BFC? What's the usage?
Web3还没实现,Web5乍然惊现!
【C语言】关键字的补充
STM32 reads IO high and low level status
微服务系统设计——分布式缓存服务设计
从某种意义来讲,互联网业已成为了一个孵化器,一个母体