Team:KIT-Kyoto/sample-1
From 2010.igem.org
(Difference between revisions)
Line 7: | Line 7: | ||
+ | <BODY> | ||
+ | <SPAN class="box" id="box"></SPAN> | ||
+ | <A href="URL" onMouseOver="pop('メッセージ1')" onMouseOut="nonPop()">リンク1</A><P> | ||
+ | <A href="URL" onMouseOver="pop('メッセージ2')" onMouseOut="nonPop()">リンク2</A><P> | ||
+ | <A href="URL" onMouseOver="pop('メッセージ3')" onMouseOut="nonPop()">リンク3</A><P> | ||
+ | <A href="URL" onMouseOver="pop('メッセージ4')" onMouseOut="nonPop()">リンク4</A><P> | ||
+ | <A href="URL" onMouseOver="pop('メッセージ5')" onMouseOut="nonPop()">リンク5</A><P> | ||
+ | </BODY> | ||
- | |||
- | |||
- | |||
- | |||
- | + | <HEAD> | |
- | + | <SCRIPT LANGUAGE="JavaScript"> | |
- | + | <!-- | |
- | + | ||
- | + | //ポップアップ表示 | |
- | + | function pop(msg){ | |
- | + | box.style.visibility = "hidden"; | |
- | + | width = 0; | |
- | { | + | height = 0; |
- | box.style.visibility = "hidden"; | + | message = msg; |
- | width = 0; height = 0; message = msg; | + | //ウィンドウ位置設定 |
- | x = event.clientX+document.body.scrollLeft+ | + | x = event.clientX+document.body.scrollLeft+10; //左からの位置 |
- | y = event.clientY+document.body.scrollTop+ | + | y = event.clientY+document.body.scrollTop+10; //上からの位置 |
- | // box.style.left = x; | + | //ウィンドウセット |
- | box.style.top = y; box.innerHTML = msg; box.style.visibility | + | box.style.left = x; |
- | = "visible"; zoom(); | + | box.style.top = y; |
- | } function zoom(){ | + | box.innerHTML = msg; |
- | width += 20; height += 10; box.style.width | + | box.style.visibility = "visible"; |
- | = width; box.style.height = height; | + | zoom(); |
- | if(width>= | + | } |
- | } else{ zoom_timer = setTimeout("zoom()",1); | + | //ポップアップズーム |
- | } } function nonPop(){ box.style.visibility | + | function zoom(){ |
- | = "hidden"; | + | //拡大 |
- | } // --> </ | + | width += 20; |
- | < | + | height += 10; |
- | + | box.style.width = width; | |
- | + | box.style.height = height; | |
- | + | if(width>=200 && height>=100){ | |
- | </ | + | } |
+ | else{ | ||
+ | zoom_timer = setTimeout("zoom()",1); | ||
+ | } | ||
+ | } | ||
+ | //ポップアップを消す | ||
+ | function nonPop(){ | ||
+ | box.style.visibility = "hidden"; | ||
+ | } | ||
+ | // --> | ||
+ | </SCRIPT> | ||
+ | <STYLE type="text/css"> | ||
+ | <!-- | ||
+ | .box {position:absolute;visibility:hidden;border:0 ridge blue;padding:5;background-color:#ffcccc;overflow:hidden;} | ||
+ | //--> | ||
+ | </STYLE> | ||
+ | </HEAD> | ||
{{Template:KIT-Kyoto-1}} | {{Template:KIT-Kyoto-1}} |
Revision as of 03:54, 8 August 2010
リンク1{{Template:KIT-Kyoto-1}}