【发布时间】:2012-01-19 07:30:56
【问题描述】:
我的 html 文件中有这段代码:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="http://www.anotherdomain.com/javascript.js" type="text/javascript"></script>
<script type="text/javascript">
$.keyCode({code: "google"});
</script>
在http://www.anotherdomain.com/javascript.js 中定义了这个函数:
$(document).ready(function(){
jQuery.keyCode = function(params){
params = $.extend( {code: "grid"}, params);
var key_code = params.code;
$("html").live("keypress", function(e){
if (cookieIsSet() == false){
check_key_pressed(key_code, e);
}
});
};
});
应用找不到$.keyCode 方法。
【问题讨论】:
标签: javascript jquery plugins jquery-plugins