图片上有三个点,且有三个div,开始div和点叠在一起,图片放大后,div就没有和图片上的点叠在一起,如何通过代码将div和图片上的点叠在一起?
代码如下:
<HTML xmlns:v> <STYLE> v:*{behavior:url(#default#VML);} </STYLE>
<BODY>
<script language="javascript">
function changeleft(a){
img1.cropleft=a;
img1.croptop=a;
img1.cropbottom=a;
img1.cropright=a;
// alert(img1.style.zoom);
/*
var x1left=document.getElementById("d1").style.left;
var xll=x1left.substr(0,x1left.length-2);
var x1=parseInt(xll)+parseInt((parseInt(xll)-300)*a*2);
var y1left=document.getElementById("d1").style.top;
var yll=y1left.substr(0,y1left.length-2);
var y1=parseInt(yll)+parseInt((parseInt(yll)-400)*a*2);
window.status=x1+"========"+y1;
document.getElementById("d1").position="absolute";
document.getElementById("d1").style.left=x1;
document.getElementById("d1").style.top=y1;
*/
var xll=208;
var sc=parseFloat(a);
//alert(sc);
var xz=parseInt(parseInt(xll)-300)*parseFloat(sc);
//alert(xz);
var x1=parseInt(xll)+parseInt(xz);
x1=parseInt(x1)-parseInt(xll)*parseFloat(sc)
var yll=332;
var y1=parseInt(yll)+parseInt((parseInt(yll)-400)*a*2);
window.status=x1+"========"+y1;
document.getElementById("d1").position="absolute";
document.getElementById("d1").style.left=x1;
document.getElementById("d1").style.top=y1;
}
function changeleft1(a){
var coordSize=graph.coordsize;
var zoom=a;
coordSize.x=graph.coordsize.x/zoom;
coordSize.y=graph.coordsize.y/zoom;
}
</script>
<input type="button" value="放大0.1" onclick="changeleft('0.1');">
<input type="button" value="放大0.2" onclick="changeleft('0.2');">
<input type="button" value="放大0.3" onclick="changeleft('0.3');">
<input type="button" value="放大0.4" onclick="changeleft('0.4');">
<input type="button" value="放大0.49" onclick="changeleft('0.49');"> 数据挖掘实验室
<input type="button" value="wer" onclick="changeleft('-0.1');">
<input type="button" value="a形" onclick="changeleft('-0.2');">
<input type="button" value="df形" onclick="changeleft('-0.3');">
<input type="button" value="adf" onclick="changeleft('-0.4');">
<input type="button" value="f" onclick="changeleft('-0.49');">
<input type="button" value="a1" onclick="changeleft1('2');">
<input type="button" value="a2" onclick="changeleft1('3');">
<input type="button" value="a3" onclick="changeleft1('4');"> 数据挖掘研究院
<input type="button" value="a4" onclick="changeleft1('5');">
<input type="button" value="a5" onclick="changeleft1('6');">
<!--
<v:group id="graph" name="graph"
style="position:relative;top:0;left:0;width:600px;height:600px;display:inline" CoordSize="600,600" CoordOrig="0,0" >
-->
<v:image id="img1" cropleft="" cropright="" chromakey="red" croptop="" cropbottom="" src="122.gif" style="Z-INDEX:1;LEFT:0;WIDTH:600px;HEIGHT:600px;POSITION:absolute;TOP:100;"/>
<div style=" position:absolute;left:300px;top:400px; width:2px; height:2px; background-color:#00FF00; z-index:65"> 数据挖掘研究院
</div>
<div id="d1" style=" position:absolute;left:208;top:332; width:2px; height:2px; background-color:#FF0000; z-index:65;">
</div>
<div id="d2" style=" position:absolute;left:388px;top:488px; width:2px; height:2px; background-color:#0000FF; z-index:65">
</div>
<!--
</v:group>
-->
</BODY>
</HTML>

