顯示廣告
隱藏 ✕
看板 Mesak
作者 mesak (Mesak)
標題 [JS] 瀏覽器讀取下一頁圖片語法
時間 2013年03月15日 Fri. PM 08:26:03


// Check if jQuery's loaded
function GM_wait() {
if(typeof window.jQuery == 'undefined') {
var GM_JQ = document.createElement('script');
   GM_JQ.src = 'http://code.jquery.com/jquery-1.9.1.min.js';
   GM_JQ.type = 'text/javascript';
   document.getElementsByTagName('head')[0].appendChild(GM_JQ);
   window.setTimeout(GM_wait,100); }
else { 
$ = window.jQuery;
letsJQuery(); }
}
GM_wait();

// All your GM code must be inside this function
function letsJQuery() {
	
$('#pagelist a').each(function(i,n){
	
	
$.get( $(n).attr('href') , function(r){
	
	
	
$('.art_con img',r).each(function(ii,nn){
	
	
	
	
var src = $(nn).attr('src')
	
	
	
	
$('.art_con:first').append('<img src="'+src +'" /><br />')
	
	
	
})
	
	
})
	
})
}

--
※ 作者: mesak 時間: 2013-03-15 20:26:03
※ 編輯: mesak 時間: 2013-03-15 22:16:01
※ 看板: Mesak 文章推薦值: 0 目前人氣: 0 累積人氣: 177 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇