|
 |
|
ทำแบบนี้ทำยังไงคะ คือ จะสลับรูปตามที่เอาเม้าท์ไปวาง สลับรูปทำได้แล้ว แต่อยากให้เวลาเปลี่ยนเป็นรูปนั้ |
|
 |
|
|
 |
 |
|
ไม่เห็นได้เลยค่ะ 
|
 |
 |
 |
 |
Date :
2009-04-22 17:35:58 |
By :
นิทาน |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แบบนี้ไหม
<script>
var hidden_link = document.getElementById('open_link').value;
function swapImage(img,open_link)
{
document.images['image_swap'].src=img;
hidden_link = open_link;
}
function window_open()
{
window.open(hidden_link,'','');
}
</script>
<input type="hidden" name="link1" >
<img src="aaa.gif" name="image_swap" width="280" height="314" id="image_swap" onclick="window_open()") />
<div onmouseover="swapImage('images/1.png','link1.html')" />Link1</div>
<div onmouseover="swapImage('images/2.png','link2.html')" />Link2</div>
|
 |
 |
 |
 |
Date :
2009-04-23 09:04:12 |
By :
heng |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แก้นิดหน่อย
<script>
var hidden_link ;
function swapImage(img,open_link)
{
document.images['image_swap'].src=img;
hidden_link = open_link;
}
function window_open()
{
window.open(hidden_link,'','');
}
</script>
<img src="1.png" name="image_swap" width="280" height="314" id="image_swap" onclick="window_open()") />
<div onmouseover="swapImage('images/1.png','link1.html')" />Link1</div>
<div onmouseover="swapImage('images/2.png','link2.html')" />Link2</div>
|
 |
 |
 |
 |
Date :
2009-04-23 09:09:03 |
By :
heng |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เริ่ดมากค่ะ ขอบคุณมากค่ะ
|
 |
 |
 |
 |
Date :
2009-04-23 13:16:32 |
By :
นิทาน |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอถามอีกนิดค่า คือตอนแรก มันยังไม่ได้เลือกที่ Link 1 2 แล้วคลิกที่รูป มันจะไม่รู้ url จะกำหนดให้เป็น url link แรกทำยังไงคะ
|
 |
 |
 |
 |
Date :
2009-04-23 13:46:16 |
By :
นิทาน |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตรง var hidden_link ;
แก้เป็น var hidden_link = 'link1.html';
ยังไม่ได้เทส
|
 |
 |
 |
 |
Date :
2009-04-23 16:35:35 |
By :
heng |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำไมได้ง่ะ 
|
 |
 |
 |
 |
Date :
2009-04-24 08:55:45 |
By :
กานดา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|