语法
context.fillText(text, x, y, [maxWidth]);
参数
text - String - 文本字符串
x - Number - 文本左上角x坐标
y - Number - 文本左上角y坐标
[maxWidth] - Number - 文本的最大宽度(可选参数)
例子
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
.place {
border: 1px dotted black;
width: 500px;
height: 500px;
}
</style>
<script>
function beginRect(id) {