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

admin3年前前端技术1015

jquery写法

$(this).attr("value")

原生写法

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

相关文章

jquery默认设置第一个类的css或者属性

var me=$("#cima>input");me.eq(0).css...

ios 手机端 input 框上方有内阴影

解决方案1:<!--如果 ui 样式里有边框,可以用外层盒子设置边框-->input{     border:none; }...

Navigate down the menu through jquery development

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

javascript获取cookie

//获取cookie function getcooki(name) { var name=name+"="; var mine=do...

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

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

发表评论    

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