jquery中的$("")与原生的document.getElementById("")的区别
来源:互联网 发布:mac语言切换快捷键 编辑:程序博客网 时间:2024/05/17 03:10
html代码:
<input type="file" name="file" id="abc" />
js代码:
console.log($('#abc'));console.log($('#abc')[0]);console.log(document.getElementById('abc'));
示例如图:
由此可见,$("#abc")[0]等同于 document.getElementById("abc")。
参考地址:http://www.blogjava.net/tyjava/articles/372007.html
0 0
- jquery中的$("")与原生的document.getElementById("")的区别
- jquery 中的 $(“#”) 与 js中的document.getElementById(“”) 的区别
- jquery 中的 $(“#”) 与 js中的document.getElementById(“”) 的区别
- jquery 中的 $(“#”) 与 js中的document.getElementById(“”) 的区别
- jquery 中的 $(“#”) 与 js中的document.getElementById(“”) 的区别
- jquery中的 $(#id)与document.getElementById( id )的区别
- jquery 中的 $("#id") 与 document.getElementById("id") 的区别
- jquery中的$("#id")与document.getElementById("id")的区别
- jquery中的$("#id")与document.getElementById("id")的区别
- jquery中的 $(#id)与document.getElementById( id )的区别
- jquery中的$("#id")与document.getElementById("id")的区别
- jquery中的$("#id")与document.getElementById("id")的区别
- jquery中的 $(#id)与document.getElementById( id )的区别
- 【JavaScript】jQuery中的$("#id")与document.getElementById("id")的区别
- document.getelementById 与 document.getelementByname 的区别
- document.getelementbyid().value与document.getElementById().innerHTML的区别
- jquery中的$("#id")与document.getElementById("id")的区别 及html()方法
- jquery 中的 $(“#”) 与 js中的document.getElementById(“”)细微区别
- Kaldi语音识别工具使用 问题Memo
- 常用的正则表达式
- 自定义android圆形ImageView
- EBS R12 LOG files 位置
- 落单的数 III
- jquery中的$("")与原生的document.getElementById("")的区别
- isset()和empty()
- Android知识点7-Android控件自定义样式
- python_正则表达式
- Android三种实现定时器的方法
- ios工程依赖
- Mapping a bidirectional list with Hibernate
- Bitmap实现照片墙
- 1113 小胖子的时钟【水题】