JavaScript External File
JavaScript 外部ファイルについて    


ランダムにリンクや画像を表示する2





<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja-JP">
<head>
<meta http-equiv="content-type" content="text/html; charset=shift_jis">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<title>ランダムにリンクや画像を表示する2</title>

</head>
<body>

<h1>ランダムにリンクや画像を表示する2</h1>

<script type="text/javascript">
<!--
Random_link = new Array(
'<img src="b_bn.gif" width="88" height="31" border="0"><br>画像1',
'<img src="logo.gif" width="88" height="31" border="0"><br>画像2',
'<img src="webbbs.gif" width="88" height="31" border="0"><br>画像3',
'<img src="top_s.gif" width="88" height="31" border="0"><br>画像4',
'<img src="java-bana3.gif" width="88" height="31" border="0"><br>画像5');

Numero = Random_link.length;//ここは変更しないように
Random_view = Math.floor(Math.random() * Numero);//ここは変更しないように

document.write(
'<p style="text-align:center">画像の表示<br><br>',
'<a href="randam_jamp2.html" target="_blank">',
''+Random_link[Random_view]+'',//ここは変更しないように
'<¥/a>',
'<¥/p>');
// -->
</script>

</body>
</html>

見本
記述をメモ帳にコピペし保存する際、このような表示されても、
そのまま続行(OKボタン押し)で、大丈夫です。
詳細はこちら:バックスラッシュ

 | HOME  | 相互リンク集  | 初心者に分かりやすい JavaScript サンプル | 

 | Contact us at Feedback  | SitePolicy | 

Last Update: 6 / 25 / 2008 17:19:17 JST

 | 子連れ ヘラブナ釣り  | ひかる君の写真集  | Bayani  | Balita  | Bagong Bayani  | Directory  | Yahoo! 360°  | Web BBS  | JS File |