Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个下面的代码
var tempqStr = $("#Qpanel" + item.data("question-id") + " > .questions")[0].innerText
这在Chrome中运行良好,但在Firefox 和 IE中我收到错误内部文本未定义。关于如何使该代码在所有浏览器中工作的任何建议?
尝试这个
$("#Qpanel" + item.data("question-id") + " > .questions")[0].text();