link.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:3k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Page language="c#" AutoEventWireup="true"  Inherits="DotNetTextBox.PageCode"%>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <html>
  4. <head>
  5. <meta http-equiv="pragma" content="no-cache" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <base target="_self" />
  8. <style type="text/css">
  9. body,a,table{font-size:12px;font-family:宋体,Verdana,Arial}
  10. </style>
  11. <script type="text/javascript">
  12. var userAgent = navigator.userAgent.toLowerCase();
  13. var is_ie = (userAgent.indexOf('msie') != -1);
  14. var arr=new Array;
  15. function insertLink()
  16. { 
  17.    if(document.getElementById("link").value!="")
  18. {
  19. arr[0]=document.getElementById("link").value;
  20. arr[1]=document.getElementById("target").value;
  21. }
  22. if(is_ie)
  23. {
  24. window.returnValue = arr;
  25. }
  26. else
  27. {
  28. if(document.getElementById("insert").value!='<%=ResourceManager.GetString("edit")%>')
  29. {
  30. if(window.opener.GetImgLink()!="")
  31. {
  32. arr[2]=window.opener.GetImgLink();
  33. }
  34. window.opener.inserObject(null,'link',arr);
  35. }
  36. else
  37. {
  38. window.opener.inserObject(null,'editlink',arr);
  39. }
  40. }
  41. window.close();
  42. }
  43. var sTitle='<%=ResourceManager.GetString("addlink")%>';
  44. if(is_ie)
  45. {
  46. if (dialogArguments!=null)
  47. sTitle='<%=ResourceManager.GetString("editlink")%>';
  48. }
  49. else
  50. {
  51. arr=window.opener.GetLink();
  52. if(arr[0]!=null)
  53. {
  54. sTitle='<%=ResourceManager.GetString("editlink")%>';
  55. }
  56. window.focus();
  57. }
  58. document.write("<TITLE>" + sTitle + "</TITLE>");
  59. </script>
  60. </head>
  61. <body leftmargin="5" topmargin="0">
  62. <form runat=server>
  63. <br />
  64. <fieldset><legend id="titletext"></legend><br />
  65. <select id="linktype" onchange="javascript:link.value=this.value">
  66. <option selected="selected"  value="http://">http</option>
  67. <option value="https://">https</option>
  68. <option value="ftp://">ftp</option>
  69. <option value="file://">file</option>
  70. <option value="gopher://">gopher</option>
  71. <option value="mailto:">mailto</option>
  72. <option value="news:">news</option>
  73. <option value="telnet:">telnet</option>
  74. <option value="wais:">wais</option>
  75. <option value="">other</option>
  76. </select>
  77. <input id="link" style="width: 205px" onload="this.focus()" value="http://" type="text" />
  78. <select id="target">
  79. <option selected="selected" value=""><%=ResourceManager.GetString("openlinktype")%></option>
  80. <option value="_blank"><%=ResourceManager.GetString("_blank")%></option>
  81. <option value="_self"><%=ResourceManager.GetString("_self")%></option>
  82. <option value="_parent"><%=ResourceManager.GetString("_parent")%></option>
  83. <option value="_top"><%=ResourceManager.GetString("_top")%></option>
  84. </select><br />
  85. <input id="insert" onclick="insertLink();parent.popMenu2.hide();" type="button" value='<%=ResourceManager.GetString("insert")%>'/>
  86. <input onclick="window.close();" type="button" value='<%=ResourceManager.GetString("close")%>'/></fieldset>
  87. </form>
  88. <script language=javascript>
  89. document.getElementById("titletext").innerHTML=sTitle;
  90. if(is_ie)
  91. {
  92. document.body.bgColor="ButtonFace";
  93. if (dialogArguments!=null)
  94. {
  95. document.getElementById("link").value=dialogArguments[0];
  96. if(dialogArguments[1]!="")
  97. {
  98. document.getElementById("target").value=dialogArguments[1];
  99. }
  100. document.getElementById("insert").value='<%=ResourceManager.GetString("edit")%>';
  101. }
  102. }
  103. else
  104. {
  105. document.body.bgColor="#E0E0E0";
  106. if(arr[0]!=null)
  107. {
  108. document.getElementById("link").value=arr[0];
  109. if(arr[1]!="")
  110. {
  111. document.getElementById("target").value=arr[1];
  112. }
  113. document.getElementById("insert").value='<%=ResourceManager.GetString("edit")%>';
  114. }
  115. }
  116. </script>
  117. </body>
  118. </html>