doo*_*son 5 html javascript model-view-controller input
为什么这不起作用?
<input type="file" id="kmlFiles2" multiple onchange="function(){alert('why does this not work')}()">
Run Code Online (Sandbox Code Playgroud)
chrome给我一个错误, Uncaught SyntaxError:Unexpected token(.
Firefox告诉我SyntaxError:function语句需要一个名字.
但这确实有效吗?
<input type="file" id="kmlFiles2" multiple onchange="alert('but this does work')">
Run Code Online (Sandbox Code Playgroud)
我问,因为我正在尝试使用和MVC框架,将代码注入onchange事件.
alj*_*gom 11
onchange="(function(){alert('this should work')})()"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9235 次 |
| 最近记录: |