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

admin3年前前端技术1329

jquery写法

$(this).attr("value")

原生写法

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

相关文章

关于css的position参数自我领悟心得整理

relative :相对与最近的DOM定位   absolute :相对里面的绝对定位,跟relative 一起用,起到随心所欲定位的效果sticky :滚顶地位定位,用与鼠标滚动...

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

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

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

Navigate down the menu through jquery development

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

让javascrip函数内的局部变量能为全局使用的方法

<script type="text/javascript">   var mine;  function&nbs...

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

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

发表评论    

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