請拿一本較新的書,或者只是使用網頁作爲資源,任何信息。從1997年起將會非常過時。
這是一個非常簡單的網站,我建議初學者之前:http://htmldog.com/guides/javascript/ 不,它並不包括所有內容,但是這樣做很好,你會得到一些關鍵的東西,然後能夠搜索谷歌更具體的東西。
給你一些準系統加時賽開始時,我會做這樣的事情:
$(document).ready(function() {
$('#nextBtn').click(function() {
transitionToNextImage();
});
});
transitionToNextImage = function() {
$('img.active-image').fadeTo(1000,0), function() {
// fade out complete.
$('#inProgressGif').show();
getNextImage();
});
};
getNextImage = function() {
// make ajax call to get new image, and
// in the success callback of the ajax call,
// remove the inProgressGif, and
// add the image ot the DOM with opacity 0,
// then slowly fade it in to opacity 1 (opposite
// of what was done above
};