以下代码是我尝试向访问该页面的任何用户弹出消息(仅适用于IE用户)。
<script src="jquery.reject.js"></script>
<script>
$(document).ready(function() {
$.reject({
reject: { all: true },
header: 'Internet Explorer is NOT Supported!',
paragraph1: 'You will not be able to blah blah blah.',
paragraph2: 'Please choose one of the browsers below for this to function.',
closeMessage: 'Note: You can still blah blah blah.'
});
return false;
});
</script>
代码有什么问题?没有语法错误,但加载页面时没有任何反应。
谢谢。
编辑:第4行,固定为目前的状态。但仍然失败。
答案 0 :(得分:1)
我认为第4行有拼写错误,你有"$jquery.reject"
而不是"$.reject"
或"jquery.reject"
答案 1 :(得分:0)
jquery.reject.js
是一个jQuery插件。您需要先加载jQuery,例如:
<script src='http://code.jquery.com/jquery-1.7.1.min.js'></script>