如何使用js或jquery删除所有属性。(我不知道正文中的属性是什么,我想将它们全部删除) 最佳答案 您可以使用DOMLevel1Coreattributes属性以列表形式访问属性。作为普通JS:functionremoveAllAttrs(element){for(vari=element.attributes.length;i-->0;)element.removeAttributeNode(element.attributes[i]);}removeAllAttrs(document.body);或者穿上jQuery插件的衣服