I encountered a problem in my project today. When I click on the a tag, the complete content needs to be displayed.
Originally I wanted to use jquery’s click method
In the click method of jquery, assign the ownattr attribute of this to the div tag of the complete content
However, this has never worked
After a while of research, I found that the original project framework uses jquery Ajax obtains the background list information. When the page executes the click method, ajax has not been completed. Then I decided to use the basic js
method:
function showDetail(obj){ var ownattr= obj.attributes[ownattr].nodeValue; //自定义属性采用此方式获得 var id = obj.id; //基本属性可以采用此方式获得 }