<SCRIPT LANGUAGE= "JavaScript">
<!--
function drawRuler()
{
var mm= document.f.p2m.value;//初始值4.4,相当于1毫米=4.4屏幕像素,可根据真实尺子或人民币纸币尺寸校正
var x0=50;
var y0=document.body.scrollHeight/2;
var rs=" ";
var h1=10;
var h5=15
var h10=20;
var h=h1;
var y=y0;
var left=0;
var n=document.body.scrollWidth/mm-50;
for(var i=0;i<n;i+=1)
{
h=h1;
y=y0;
if(i%10==0){
h=h10;
y=y+h1-h10;
if(i<100){
left=x0+i*mm-7;
}
else{
left=x0+i*mm-14;
}
rs=rs+"<table style='left:"+left+";top:"+(y0-30)+" ;position:absolute'><td>"+(i/10)+"</td></table>";
}
else if(i%5==0){
h=h5;
y=y+h1-h5;
}
rs+="<div style=' background-color:black ;height:"+h+";width:1;top:"+y+";left:"+(x0+i*mm)+";position:absolute; '></div>";
}
//alert(document.body.scrollHeight+"---"+document.body.scrollWidth);
document.getElementById('div1').innerHTML=rs;
}
//-->
</SCRIPT>
<div id=div1></div>
<form name="f" AutoRedraw="False">
<td vAlign="top" width="20">请输入调整值
<input name="p2m" size="8" value="4.4"></td>
</form>
<button οnclick="drawRuler()"> 生成尺 </button>
<br>
<table border="1">
<tr><th>第五套人民币尺寸:</th></tr>
<tr><td>100元纸币155X77</td></tr>
<tr><td>50元纸币150X70</td></tr>
<tr><td>20元纸币145X70</td></tr>
<tr><td>10元纸币140X70</td></tr>
<tr><td>5元纸币134X63</td></tr>
<tr><td>1元纸币130X63</td></tr>
</table>
<!--
function drawRuler()
{
var mm= document.f.p2m.value;//初始值4.4,相当于1毫米=4.4屏幕像素,可根据真实尺子或人民币纸币尺寸校正
var x0=50;
var y0=document.body.scrollHeight/2;
var rs=" ";
var h1=10;
var h5=15
var h10=20;
var h=h1;
var y=y0;
var left=0;
var n=document.body.scrollWidth/mm-50;
for(var i=0;i<n;i+=1)
{
h=h1;
y=y0;
if(i%10==0){
h=h10;
y=y+h1-h10;
if(i<100){
left=x0+i*mm-7;
}
else{
left=x0+i*mm-14;
}
rs=rs+"<table style='left:"+left+";top:"+(y0-30)+" ;position:absolute'><td>"+(i/10)+"</td></table>";
}
else if(i%5==0){
h=h5;
y=y+h1-h5;
}
rs+="<div style=' background-color:black ;height:"+h+";width:1;top:"+y+";left:"+(x0+i*mm)+";position:absolute; '></div>";
}
//alert(document.body.scrollHeight+"---"+document.body.scrollWidth);
document.getElementById('div1').innerHTML=rs;
}
//-->
</SCRIPT>
<div id=div1></div>
<form name="f" AutoRedraw="False">
<td vAlign="top" width="20">请输入调整值
<input name="p2m" size="8" value="4.4"></td>
</form>
<button οnclick="drawRuler()"> 生成尺 </button>
<br>
<table border="1">
<tr><th>第五套人民币尺寸:</th></tr>
<tr><td>100元纸币155X77</td></tr>
<tr><td>50元纸币150X70</td></tr>
<tr><td>20元纸币145X70</td></tr>
<tr><td>10元纸币140X70</td></tr>
<tr><td>5元纸币134X63</td></tr>
<tr><td>1元纸币130X63</td></tr>
</table>