Meteor React组件onClick事件在IE中不起作用
Meteor React component onClick event not working in IE
我目前正在使用React开发一个小型Meteor应用程序,遇到了一个问题(似乎是一夜之间,可能是更新引起的?),我的onClick事件在IE中没有启动,但在其他浏览器中运行良好。
请参阅以下示例-
if (Meteor.isClient) {
Meteor.startup(function ()
{
React.render(<TestComponent />, document.getElementById("render-target"));
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
TestComponent = React.createClass({
showAlert()
{
alert("On click!");
},
render()
{
return (
<div><button onClick={this.showAlert}>Click Me</button></div>
)
}
});
代码只需在页面上加载一个按钮,并在单击时显示警报。这在Chrome/Firefox中运行良好,但在Internet Explorer中不会显示警报。有人能解释一下吗?
更新:
最新版本的React似乎出现了一些问题。看起来修复程序将于明天发货:
https://github.com/facebook/react/issues/5324
相关文章:
- window.opener.document在ie中不起作用
- 为什么Telerik cdn在IE中不起作用
- JQuery脚本在IE中不起作用
- 默认光标在IE和Mozilla中不起作用
- Asp自定义验证器在IE-11中不起作用
- knockoutjsforeach在IE 9中不起作用
- 谷歌分析在IE中不起作用
- javascript中的SVG转换在IE 11中不起作用
- 用于播放背景音乐的嵌入式flash播放器在IE浏览器中不起作用
- 在IE中切换javascript不起作用的复选框
- JQuery日期选择器在IE 7上不起作用
- HTML表单在IE中不起作用
- Javascript style.background在IE中不起作用
- 对<asp:IE 10的TextBox;不起作用
- Javascript/AAJAX在Opera中不起作用,在FF/IE/Chrome中完美工作
- SPA异步调用在IE 11中不起作用
- 脚本在IE 9中不起作用
- ng-单击在IE中不起作用的选项选择Angularjs
- JQuery 双击侦听器在选择 - IE 不起作用
- 脸书登录IE不起作用