contains和comparedocumentposition方法来确定是否htm