http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
画图很方便实用。
例子:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/wz_jsgraphics.js"></script>
</head>
<body>
<script type="text/javascript">
<!--
function myDrawFunction()
{
jg_doc.setColor("#00ff00"); // green
jg_doc.fillRect(200,500,453,20);
jg_doc.paint(); // draws, in this case, directly into the document
}
var jg_doc = new jsGraphics(); // draw directly into document
myDrawFunction();
//-->
</script>
</body>
</html>
本文介绍了一种利用jsGraphics库进行网页绘图的方法。通过一个简单的示例展示了如何设置颜色并绘制矩形到HTML页面中。该技术适用于前端开发者希望直接在网页上实现基本图形绘制的场景。
1401

被折叠的 条评论
为什么被折叠?



