我正在尝试使用函数.text()将文本写入元素范围,但出现此错误UncaughtTypeError:undefinedisnotafunction,我也试过functionappend(),innerHtml(),createTextNode()都没有成功。我做错了什么?varcloseSpan=document.createElement("span");closeSpan.setAttribute("class","sr-only");closeSpan.text("Close");//UncaughtTypeError:undefinedisnotafunction或varclo