这个是根据讫讫发的画线程序改编的。
<?xml version="1.0" encoding="gb2312" standalone="yes"?>
<html xmlns:v="http://www.eglic.com/">
<head>
<title></title>
<style type="text/css">
v\:* {behavior:url(#default#VML);}
</style><script language="javascript">
var Working=false;
var lastX=0;
var lastY=0;
document.ondblclick=function (){
if(!Working) return;
lastX=0;
lastY=0;
Working=false;
}
document.onclick=function (){
if(!Working){
Working=true;
lastX=event.x;
lastY=event.y;
}else{
var s='<v:line from="'+lastX+','+lastY+'" to="'+event.x+','+event.y+'" style="position:absolute;left:0px;top:0px;"></v:line>';
lastX=event.x;
lastY=event.y;
var o=document.createElement(s);
document.body.insertAdjacentElement('BeforeEnd',o);
}
}
document.onmousemove=function (){
if(!Working) return;
}
</script>
</head>
<body>
<input name=button type="button" value="保存" onclick="event.cancelBubble='false';document.getElementById('saveHTML').value=document.body.innerHTML;alert(document.getElementById('saveHTML').value)">
<input name=saveHTML type=hidden>
</body>
</html>
你自己改改看看