代码如下

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SAPShowImage.aspx.cs" Inherits="UOASWeb.UOASSAP.SAPShowImage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>图片详细信息</title>
    <link href="../CSS/Table.css" type="text/css" rel="Stylesheet" />
    <script src="../JS/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="../JS/jquery.rotate.1-1.js" type="text/javascript"></script>
    <style type="text/css" media="screen">
        *
        {
            margin: 0;
            padding: 0;
        }
        .fixed_div
        {
            width: 1270px;
            height: 25px;
            position: fixed;
            background: #e5e5e5;
            top: 0;
            z-index: 1000;
            left: 0px;
            border: 1px solid red;
        }
    </style>
    <script type='text/javascript'>
        var size = 0;
        //放大缩小图片
        function imgToSize(size) {
            var img = $("#Imgbox");
            var oWidth = img.width(); //取得图片的实际宽度
            var oHeight = img.height(); //取得图片的实际高度
            img.width(oWidth + size);
            img.height(oHeight + size / oWidth * oHeight);
        }
        // 翻转图片
        function imgReverse(arg) {
            var img = $("#Imgbox");
            if (arg == 'h') {
                img.css({ 'filter': 'fliph', '-moz-transform': 'matrix(-1, 0, 0, 1, 0, 0)', '-webkit-transform': 'matrix(-1, 0, 0, 1, 0, 0)' });
            } else {
                img.css({ 'filter': 'flipv', '-moz-transform': 'matrix(1, 0, 0, -1, 0, 0)', '-webkit-transform': 'matrix(1, 0, 0, -1, 0, 0)' });
            }
        }
    </script>
</head>
<body>
    <center>
        <form id="form1" runat="server">
        <div class="fixed_div">
            <input type="button" value=" 放 大 " onclick="imgToSize(50)" />&nbsp;
            <input type="button" value=" 缩 小 " onclick="imgToSize(-50);" />&nbsp;
            <input type="button" value="向右旋转" onclick="$('#Imgbox').rotateRight(-90)" />&nbsp;
            <input type="button" value="向左旋转" onclick="$('#Imgbox').rotateRight(90);" />
        </div>
        <br />
        <table class="tls">
            <%= BindImageInfo()%>
        </table>
        </form>
    </center>
</body>
</html>

 

posted on 2013-02-25 13:43  莫等闲也  阅读(7101)  评论(0编辑  收藏  举报