2022年10月20日 星期四

jquery常用

 在 jQuery 中 $('#el'); // 取得 id 為 el 的元素

在 JavaScript DOM 中 document.getElementById('el');



在 jQuery 中 $('.item'); // 取得 class name 為 item 的所有元素

在 JavaScript DOM 中 document.getElementsByClassName('item');





沒有留言:

張貼留言