使用 Android 浏览器打开时 onblur 事件不起作用
用 Opera 手机和 Firefox 打开它时一切正常,但当我用 Android 浏览器打开它时,该功能不起作用。如何修复它?
$(document).ready(function(){
var price = document.getElementsByClassName('harga')[0];
var tax = document.getElementsByClassName('dp_per')[0];
var taxAmount = document.getElementsByClassName('dp')[0];
tax.onblur = function() {
taxAmount.value = parseFloat(price.value) * parseFloat(tax.value) / 100;
}
})(jQuery);
这是我所做的: http://jsfiddle.net/mYEUP/
Everything is working when open it with Opera mobile and Firefox, but when I open it with Android browser, the function not working. How to fix it?
$(document).ready(function(){
var price = document.getElementsByClassName('harga')[0];
var tax = document.getElementsByClassName('dp_per')[0];
var taxAmount = document.getElementsByClassName('dp')[0];
tax.onblur = function() {
taxAmount.value = parseFloat(price.value) * parseFloat(tax.value) / 100;
}
})(jQuery);
Here is what I've made:
http://jsfiddle.net/mYEUP/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论