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

admin3年前前端技术1340

jquery写法

$(this).attr("value")

原生写法

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

相关文章

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

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

whatsapp浮动按钮

whatsapp浮动按钮

whatsapp浮动按钮whatsapp.zip...

Navigate down the menu through jquery development

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

js与jquery自动触发a链接的方法

自动触发a链接的方法如下:1.<body >  <a  href="http://www.shengmake.net"&...

分享与定时自动跳转

<!DOCTYPE html> <html> <head> <meta charset="utf-8">...

发表评论    

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