码迷,mamicode.com
首页 > Web开发 > 详细

html5画板的操作

时间:2014-06-03 15:44:04      阅读:378      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

bubuko.com,布布扣

bubuko.com,布布扣
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/canvas.css" type="text/css" rel="stylesheet">
<title>着图版</title>
</head>
<body>

    <header id="header">画图板</header>

    <section id="context">
        <header id="tool">
            <ul>
                <li>
                    <h3>图像</h3>
                    <hr>
                    <ul id="image">
                        <li>
                        <form action="saveImage.php" method="post">
                        <input type="hidden" name="image" id="image" value="">
                        <button onclick="saveImage()">保存图片</button>
                        </form>
                        </li>
                        <li><button onclick="clearTable()">清空画板</button></li>
                    </ul>
                </li>
                <li>
                    <h3>工具</h3>
                    <hr />
                    <ul id="means">
                        <li id="means_brush" onclick="drawBrush(0)"><img src="images/Brush.png" /></li>
                        <li id="means_eraser" onclick="drawEraser(1)"><img src="images/Eraser.png" /></li>
                        <li id="means_paint" onclick="drawPaint(2)"><img src="images/Paint.png" /></li>
                        <li id="means_straw" onclick="drawStraw(3)"><img src="images/Straw.png" /></li>
                        <li id="means_text" onclick="drawText(4)"><img src="images/text.png" /></li>
                        <li id="means_magnifier" onclick="drawMagnifier(5)"><img src="images/Magnifier.png" /></li>
                    </ul>
                </li>
                <li>
                    <h3>形状</h3>
                    <hr />
                    <ul id="shape">
                        <li id="shape_line" onclick="drawLine(6)"><img src="images/line.png" /></li>
                        <li id="shape_arc" onclick="drawArc(7)"><img src="images/arc.png" /></li>
                        <li id="shape_rect" onclick="drawRect(8)"><img src="images/rect.png" /></li>
                        <li id="shape_poly" onclick="drawPloy(9)"><img src="images/poly.png" /></li>
                        <li id="shape_arcfill" onclick="drawArcfill(10)"><img src="images/arcfill.png" /></li>
                        <li id="shape_rectfill" onclick="drawRectfill(11)"><img src="images/rectfill.png" /></li>
                    </ul>
                </li>
                <li>
                    <h3>线宽</h3>
                    <hr />
                    <ul id="size">
                        <li id="size_line1px" onclick="changeSize(0)"><img src="images/line1px.png" /></li>
                        <li id="size_line3px" onclick="changeSize(1)"><img src="images/line3px.png" /></li>
                        <li id="size_line5px" onclick="changeSize(2)"><img src="images/line5px.png" /></li>
                        <li id="size_line8px" onclick="changeSize(3)"><img src="images/line8px.png" /></li>
                    </ul>
                </li>
                <li><h3>颜色</h3>
                    <hr />
                    <ul id="color">
                        <li id="red" onclick="changColor(this,0)"></li>
                        <li id="green" onclick="changColor(this,1)"></li>
                        <li id="blue" onclick="changColor(this,2)"></li>
                        <li id="yellow" onclick="changColor(this,3)"></li>
                        <li id="white" onclick="changColor(this,4)"></li>
                        <li id="black" onclick="changColor(this,5)"></li>
                        <li id="pink" onclick="changColor(this,6)"></li>
                        <li id="purple" onclick="changColor(this,7)"></li>
                        <li id="cyan" onclick="changColor(this,8)"></li>
                        <li id="orange" onclick="changColor(this,9)"></li>
                    </ul></li>
            </ul>
        </header>
        <canvas width="880px;" height="400px;" id="canvas">您的浏览器的版本过低,不支持canvas标签的使用!</canvas>
        <script type="text/javascript" src="js/canvas.js"></script>
    </section>
    <footer id="footer">
        <small>版权所有@net.nyist.java</small>
    </footer>

</body>
</html>
bubuko.com,布布扣

 

html5画板的操作,布布扣,bubuko.com

html5画板的操作

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/yu0312chao/p/3765275.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!