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

admin3年前前端技术1110

jquery写法

$(this).attr("value")

原生写法

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

相关文章

ubbedit实现遍历绝对目录绑定cookie查询以前上传的图片

ubbedit实现遍历绝对目录绑定cookie查询以前上传的图片

设置cookie ,$user_id=$_COOKIE["user_email"];设置path   , $path =  "/"...

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属性...

webpack全局安装了,使用命令时却提示安装脚手架

全局安装了webpack ,使用webpack的时候,却有如下的提示One CLI for webpack must be installe...

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

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

js获取客户端电脑硬件信息

js获取客户端电脑硬件信息

只能在IE下运行,下载地址如下js_get_hard_information.zipIE要开启:...

发表评论    

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