◆页面(draw3.aspx)
<%@ page language="c#" codebehind="draw3.aspx.cs" autoeventwireup="false" inherits="ctest.draw3" %> 【程序编程相关:手机无线遥控器,让手机变成无线鼠标+无线】 【推荐阅读:Acrobat和PDF中的坐标系统(二)】<!doctype html public "-//w3c//dtd html 4.0 transitional//en" > 【扩展信息:不要忘记引号】 <html> <head> <title>draw</title> <meta content="microsoft visual studio .net 7.1" name="generator"> <meta content="c#" name="code_language"> <meta content="javascript" name="vs_defaultclientscript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetschema"> <script language="javascript" src="jsgraphics.js" type="text/javascript"></script> </head> <body ms_positioning="gridlayout"> <form id="form1" method="post" runat="server"> <asp:datalist id="datalist1" style="z-index: 101; left: 16px; position: absolute; top: 392px" runat="server" width="80%"> <itemtemplate> <asp:textbox id="textselitem" runat="server" width="70%"></asp:textbox><div id="selitemcoordinate" runat="server"><font>坐标:(</font> <asp:textbox id="textselitemx" runat="server" width="30px">0</asp:textbox><font>,</font> <asp:textbox id="textselitemy" runat="server" width="30px">0</asp:textbox><font>)</font></div> </itemtemplate> </asp:datalist> <div id="parentdiv" style="z-index: 102; left: 16px; width: 640px; position: absolute; top: 40px; height: 300px; background-color: aliceblue" runat="server" ms_positioning="gridlayout" nowrap></div> <asp:textbox id="textoper" style="z-index: 103; left: 16px; position: absolute; top: 8px" runat="server" width="24px">1</asp:textbox> <asp:radiobuttonlist id="radiobuttonlist1" style="z-index: 104; left: 16px; position: absolute; top: 352px" runat="server" width="448px" repeatdirection="horizontal" autopostback="true"> <asp:listitem value="0" selected="true">定义节点</asp:listitem> <asp:listitem value="1">节点位置排放</asp:listitem> <asp:listitem value="2">节点间连线</asp:listitem> </asp:radiobuttonlist><asp:button id="button2" style="z-index: 105; left: 544px; position: absolute; top: 8px" runat="server" text="justrefresh"></asp:button> <asp:textbox id="textanswer" style="z-index: 106; left: 48px; position: absolute; top: 8px" runat="server" width="480px"></asp:textbox><input id="hidtag" style="z-index: 107; left: 480px; position: absolute; top: 352px" type="hidden" name="hidden1" runat="server"> <asp:textbox id="textbox1" style="z-index: 108; left: 700px; position: absolute; top: 104px" runat="server"></asp:textbox></form> <script> //被拖动的对象 var obj=´´ var startobj=""; //被拖动对象的最初坐标位置 var pleft,ptop; //起点坐标,终点坐标 var startleft,starttop,endleft,endtop; var jg = new jsgraphics("parentdiv"); var clientwidth = document.all("parentdiv").clientwidth; var clientheight = document.all("parentdiv").clientheight; var clientleft = document.all("parentdiv").style.pixelleft; ... 下一页