jquery如何获取div里面value的值以及原生写法

admin4年前前端技术1664

jquery写法

$(this).attr("value")

原生写法

var value = document.getElementById(""+id+"").getAttribute("value")

相关文章

shopify多属性展示多张图片

以下几款应用可以实现按多属性展示多张图片,让图库中只显示所选颜色对应的图片:Clever Variant Images(4.9 星):apps.shopify.com/clever-product-v...

让TD 与div自动换行的css方法

word-wrap: break-word;  word-break: break-all; white-space: normal;...

原生javascrip 复制功能

兼容chrome FIrfox IE 下载地址000.zip代码如下:<!DOCTYPE html> <html> <head> &nbs...

Navigate down the menu through jquery development

The core knowledge is to use jquery's hover method to achieve, The animation effe...

H5页面移动端双击屏幕禁止页面放大

在meta标签中加入user-scalable=no属性...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。