你能有多個$(文檔).就緒(函數(){…)嗎?(});章節?如果我在創業時有很多功能,它們是否都必須放在一個下面:$(document).ready(function() {或者我可以有多個這樣的陳述?
3 回答
Helenr
TA貢獻1780條經驗 獲得超4個贊
$(document).ready(function() {
// Jquery
$('.hide').hide();
$('.test').each(function() {
$(this).fadeIn();
});
// Reqular JS
function test(word) {
alert(word);
}
test('hello!');});- 3 回答
- 0 關注
- 508 瀏覽
相關問題推薦
添加回答
舉報
0/150
提交
取消
