JQuery处理DOM元素-属性操作 //操作元素的属性: $('*').each(function(n){ this.id = this.tagName + n; }) //获取属性值: $('').attr(''); //设置属性值: //为一个属性设置值 $('*').attr('title', function(index, previousValue){ return previousValue + ' I am element ' + index + ' and my name is
<!DOCTYPE html><html> <head>HTML DOM status 属性</head><body><script type="text/javascript">window.status="Some text in the status bar!!";</script> </body></html> HTML DOM status 属性 H