我正在使用Kango 扩展框架开发浏览器扩展
通过使用内容脚本,我在页面中注入了一些代码,如下所示
<span onmouseover= "hello('testing_name')" style='width:17%;padding: 3px; background-color: red; color: white; />
我只有在同一个内容脚本中有 hello(str) 函数定义,
就像下面
function hello(test_name)
{
alert(test_name);
}
但是每当我试图将鼠标悬停在 Span 元素上时,
ReferenceError: hello is not defined
就会发生错误。
我在这里做错了什么