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

admin3年前前端技术1238

jquery写法

$(this).attr("value")

原生写法

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

相关文章

分享与定时自动跳转

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

ubbedit文件精简,删除所有用不到的文件,设置新的路径调用

ubbedit文件精简,删除所有用不到的文件,设置新的路径调用

移动editor_api.js文件从ex目录到ubbedit目录,设置 baseURL = '/ubbedit/_src/';设置Gruntfile.js文件 js...

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

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

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

通过jquery开发导航下来菜单

核心知识是用jquery的hover方法去实现,动画效果是slideDown与slideUp代码下载地址:点击下载...

Navigate down the menu through jquery development

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

发表评论    

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