我在jQuery中做一些非常基本的事情時遇到問題。有人能告訴我我究竟做錯了什麼嗎?
如果我運行下面的代碼,函數$ .get似乎缺少(getJSON和其他人也缺少)。但$本身和其他函數確實存在,所以我知道JQuery正在加載。
google.load("jquery", "1.3.2");
function _validate(form, rules_file) {
$.get('/validation_rules.json',function(data) {
alert("hello")
})
}
任何想法將不勝感激。
感謝, 羅布
編輯:這裏是一些額外的信息:
<script src="http://www.google.com/jsapi"></script>
<script>
google.load("prototype", "1.6");
google.load("scriptaculous", "1.8");
google.load("jquery", "1.3.2");
</script>
<script>
jQuery.noConflict(); // prevent conflicts with prototype
</script>
<script src="/livepipe/src/livepipe.js"
type="text/javascript"></script>
<script src="/livepipe/src/window.js"
type="text/javascript"></script>
<script src="/livepipe/src/tabs.js"
type="text/javascript"></script>
<script src="/jquery.maskedinput-1.2.2.js"
type="text/javascript"></script>
JQuery網站上的基本用法示例說使用jquery-x.x.x.slim.min.js,顯然這對AJAX調用不起作用。謝謝! – bcarroll 2018-01-17 04:25:36