【发布时间】:2013-07-03 04:33:24
【问题描述】:
这是 HTML 代码
<p onclick='javascript:func(this);'>Bla bla bla</p>
这里是脚本(写在文档的开头)。
function func(e) {
var t = e.text();
console.log(t);
}
它不起作用,我不明白为什么。错误消息是“Object # has no method 'text'”。
【问题讨论】:
-
我没有看到任何 jQuery。
标签: javascript jquery dom javascript-events