[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
電腦觀點-初學者討論區 • 檢視主題 - 學生用Smart Cards來温習功課

學生用Smart Cards來温習功課

電腦壞了?硬體故障?當機連連?呼朋引伴來救命

版主: hammer, baga80

學生用Smart Cards來温習功課

文章Henry » 週四 11月 08, 2007 11:35 am

我很想做一個不用上網的情況下都能有散亂選擇的圖案出現, (我曾用過Access 可直接顯示圖片但沒有散亂選圖的功能; 又曾用過Excel 雖然有散亂選文字功能但無直接顯示圖像功能.) 就如同學生們常用的Smart Cards 來在一叠咭片中任意抽取一張巳有圖文的咭片來温習. 我的朋友曾給我一個如下程式存入在 .html 格式及同一檔案中存入相片分別名為 01.jpg, 02.jpg, 03.jpg 或 .jpeg 格式. 經過 Allow Blocking 歩聚後再 recycle, 可惜總是得到 < script language="javascript" type="text/javascript"> 的顯示. 究竟是何處出錯, 我是用着Windows XP pk2及有Firewall, antivirus.
希望各位能夠給我一個可以不用上網的情況下, 衹按key board或left click mouse就能散亂的顯示一幅有圖文並茂資料的方法, 學生們就有福了來亨有如Smart Cards的方法來温習了.

<html>
<head>
<title>Untitled Document</title>

<meta http-equiv="Content-Type" content=
"text/html; charset=iso-8859-1">
</head>

<body onLoad="doit()"
>
<center>

<
script language="javascript"
type="text/javascript">
<!--
// RANDOM GENERATOR

image = new Array();
text = new Array();

//****PUT YOUR IMAGES AND TEXT HERE, NOTICE THAT THE FIRST IMAGE MUST START W/ 0 AND NOT 1*****


//****YOU MAY ADD MORE IMAGES BY FOLLOWING THE SIMILAR PATTERN******
//****MAKE SURE THE IMAGES ARE IN THE SAME LOCATION AS YOUR .htm FILE******
//****THE FILE YOU CAN SAVE OFF THE WEB OR JUST CUT AND PASTE ALL THESE INTO A TEXT FILE******


image[0] = "01.jpg"; text[0] = "hi this is text 1";
image[1] = "02.jpg"; text[1] = "hi this is text 2";
image[2] = "03.jpg"; text[2] = "hi this is text 3";



function doit() {
var randomnum = Math.floor(Math.random()*image.length);
var gen_image = image[randomnum];
var gen_text = text[randomnum];

document.writeln("<center>");

document.writeln
("<img src = '" + gen_image + "' />");
document.writeln("<br />");
document.writeln("Details: " + gen_text);
document.writeln("<p><a onclick='

window.location.reload()'>Next Image</a></p>");
document.writeln("</center>");

}
//-->
</script>

</
center>
</body>
</html>
亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

文章hammer » 週四 11月 08, 2007 3:23 pm

頭像
hammer
站長
站長
 
文章: 812
註冊時間: 週一 5月 01, 2006 10:41 am

多謝站長

文章Henry » 週五 11月 09, 2007 1:20 am

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

文章hammer » 週五 11月 09, 2007 2:27 am

文末有一句:

意思就是希望你能自行鑽研一下,並非單純套用。

又,

就是請你準備,00.jpg ~ 99.jpg等100張圖檔,
頁面出現『X』及HELLO!字樣代表,該程式碼找不到對應的圖檔,
也就是你沒準備圖檔放在該放的路徑下。

PS:試著在X(叉燒包)圖案上按右鍵,檢視該圖檔檔名為?路徑為?
便可知道自己的錯誤在何處。

祝好運
頭像
hammer
站長
站長
 
文章: 812
註冊時間: 週一 5月 01, 2006 10:41 am

成功

文章Henry » 週五 11月 09, 2007 6:12 am

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

衹能顯示圖片02至61

文章Henry » 週五 11月 09, 2007 1:53 pm

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

文章hammer » 週五 11月 09, 2007 3:41 pm

頭像
hammer
站長
站長
 
文章: 812
註冊時間: 週一 5月 01, 2006 10:41 am

成功, 多謝

文章Henry » 週六 11月 10, 2007 6:45 pm

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

還有漏了一些問題

文章Henry » 週六 11月 10, 2007 7:02 pm

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

文章hammer » 週日 11月 11, 2007 6:41 pm

頭像
hammer
站長
站長
 
文章: 812
註冊時間: 週一 5月 01, 2006 10:41 am

文章Henry » 週一 11月 12, 2007 2:42 pm

圖檔
亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

文章Henry » 週一 11月 12, 2007 2:56 pm

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am

多謝站長

文章Henry » 週一 11月 12, 2007 3:35 pm

亨利
頭像
Henry
資深初學者
資深初學者
 
文章: 309
註冊時間: 週三 10月 10, 2007 6:35 am


回到 疑難雜症專區

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 8 位訪客

cron