定義變量:
[javascript]
var startX;
var startY;
var endX;
var endY;
var radius;
var canvas = document
var context = canvas
var select = document
var startX;
var startY;
var endX;
var endY;
var radius;
var canvas = document
var context = canvas
var select = document
函數部分:
[javascript]
window
canvas
e = e || event;
startX = e
startY = e
if(select[
canvas
} else {
canvas
}
}
canvas
canvas
}
}
function moveShowRect(e) {
context
endX = e
endY = e
context
context
context
context
context
context
context
}
function moveShowArc(e) {
context
endX = e
endY = e
radius = Math
context
context
context
context
context
context
context
}
window
canvas
e = e || event;
startX = e
startY = e
if(select[
canvas
} else {
canvas
}
}
canvas
canvas
}
}
function moveShowRect(e) {
context
endX = e
endY = e
context
context
context
context
context
context
context
}
function moveShowArc(e) {
context
endX = e
endY = e
radius = Math
context
context
context
context
context
context
context
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19820.html