All pastes #605928 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-06 15:15 UTC
rendered paste body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<script type='text/javascript' src='js/jquery.js'></script>
	<script type='text/javascript' src='js/interface.js'></script>
	<script type='text/javascript'>
		$(document).ready(function(){
			
			$('#draw').mousedown(function(e){
				
				var sx = e.pageX - this.offsetLeft;
				var sy = e.pageY - this.offsetTop;
				draw(sx, sy);
								
			});
			
			$(this).mouseup(function(e){
			
				var ex = e.pageX - this.offsetLeft;
				var ey = e.pageY - this.offsetTop;
				draw(ex, ey);
				
			});
			
			function draw(sx, sy, ex, ey){
			
			};
			
		});
	</script>
</head>
<body>
	<div id='coor'>x, y</div>
	<div id='draw' style='position: relative; display: block; width: 100%; height: 800px; border: 1px solid black;'></div>
</body>
</html>