1.Get the attribute, check the value var attr = $(this).attr('name'); // For some browsers, `attr` is undefined; for others, `attr` is false. Check for both. if (typeof attr !== typeof undefined && attr !== false) { // Element has this attribute }…
//选择不包含class属性的节点 var result = node.SelectNodes(".//span[not(@class)]"); //选择不包含class和id属性的节点 var result = node.SelectNodes(".//span[not(@class) and not(@id)]"); //选择不包含class="expire"的span var result = node.SelectNodes("…