<%@ page language="C#" autoeventwireup="true" inherits="ims.codes, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="codes">
<head runat="server">
    <title>代码表</title><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width,initial-scale=1">
    <style type="text/css">
        body{margin:1.5em 1em 0 !important;max-width:520px}
    </style>
    <script src="js/comm.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div runat="server" id="pageTitle" class="pageTitle"></div>
        <table class="hr rowhover">
            <tr><th style="width:4em">ID</th><th>名称</th><th style="width:10.5em" runat="server" id="tdf">代码</th><th style="width:3.2em">复制ID</th></tr>
            <asp:PlaceHolder runat="server" ID="phCodes"></asp:PlaceHolder>
        </table>
        <div class="footBtnArea">
            <button type="button" onclick="back();" class="btn">返回</button>
        </div>
    </form>
    <script>
        $(function () {
            new ClipboardJS(".hr tr td:last-child", {
                text: function (e) {
                    return getEleValue($(e).closest("tr").find("td:first"));
                }
            }).on('success', function (e) {
                alert("已复制到剪贴板！");
            });
            var tdfns = $("td.blue");
            if (tdfns.length) {
                tdfns.attr("title", "点击复制代码").addClass("pointer");
                new ClipboardJS("td.blue", {
                    text: function (e) {
                        return "[" + $(e).text() +"]";
                    }
                }).on('success', function (e) {
                    alert("已复制到剪贴板！");
                });
            }
        });
    </script>
</body>
</html>