作者jskshan (Shan)
看板Ajax
標題[問題] javascript將圖放大然後點擊停止動作
時間Wed Oct 10 04:26:30 2012
各位好,我是js的新手
我現在有一個code是將一張圖做放大然後放大的圖顯示在原始圖的右邊
其中javascript的code是
<SCRIPT src="
http://files.jb51.net/imgby/imageZoom.js"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
window.onload=function() {
new imageZoom("img1",{
onShow:function() {
document.title="show,you are moving on the image.";
},
onHide:function() {
document.title="you mouse move out the image";
},
});
new imageZoom("dd2",{
mul:8
});
</SCRIPT>
然後html放大圖片地方的寫法是
<DD id=dd2><IMG id=img2 style="HEIGHT: 360px" alt=avril src="<?php echo
xxx . $screenshot; ?>" id="photo">
我現在就是想將滑鼠移到這張圖上 右邊就會出現滑鼠游標這個位置的放大圖
然後我想要做點擊滑鼠左鍵 右邊的放大圖就不會隨著滑鼠游標的位置改變
也就是讓右邊的圖能夠點擊然後鎖定圖片
但是我是了很久也用了很多方法
一直不知道該怎麼改
請問有專家可以幫我解答這個問題嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.130.39