jquery .on事件中返回的常用值列表

    |     2017年7月30日   |   学习偶记   |     评论已关闭   |    3103


//form里的click捕获 程序内新建的对象,必须用document
$(document).on('blur','元素选择器',function(e)
{
var obj = e.target;
//alert(obj.id+obj.innerHTML);
$.each(obj,function(index,value)
{
alert('index:'+index+' value='+value);
});
});

defaultValue = 元素的初始值
value = 元素的当前值
textLength 新值的长度
hidden 是否隐藏 true/false
tabIndex tab索引
draggable 是否允许拖动 true/false
id = 元素的id
className = 类名
innerHTML = html 旧值
outerHTML = 包含元素的html(同时也包含旧值)
textContent = textarea 的内容
name = 元素的name
placeholder = 元素的placeholder
readOnly = 元素的只读属性 true/false
required = 元素的required true/false

噢!评论已关闭。