给object一个id,例如:id="myObject"js代码:var obj=document.getElementById('myobject');obj.setAttribute('data','我勒个去');