⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hyperlink.htm

📁 基于ASP的OA办公系统有BBS
💻 HTM
字号:
<html>
<head>
	<title>超链接                                       </title>
<link rel="stylesheet" href="css/css.css" type="text/css">
<style type="text/css">
<!--
body {
  border:0;
  overflow:	hidden;
  margin: 0;
  font:	MessageBox;
  background-color:buttonface;
}

-->
</style>
</head>

<script language="JavaScript">
	var linkType;
	var DHTMLSafe;
	
	function initialize() {
		DHTMLSafe = window.dialogArguments.DHTMLSafe;
		var trSel=DHTMLSafe.DOM.selection.createRange();
		var coll=DHTMLSafe.DOM.all.tags("A");
		var fBreak=false;

		for(i=0;i<coll.length&&!fBreak;i++) {
			trLink=DHTMLSafe.DOM.body.createTextRange();
			trLink.moveToElementText(coll[i]);

			if((trSel.compareEndPoints("EndToStart",trLink)==1)&&
				(trSel.compareEndPoints("StartToEnd",trLink)==-1))
			{
				if(trSel.compareEndPoints("StartToStart",trLink)==1)
					trSel.setEndPoint("StartToStart",trLink);
				if(trSel.compareEndPoints("EndToEnd",trLink)==-1)
					trSel.setEndPoint("EndToEnd",trLink);
				
				trSel.select();
				document.all.linkform.oHref.value=coll[i].href;
				document.all.linkform.oTarget.value=coll[i].target;
				document.all.linkform.oStyle.value=coll[i].style.cssText;
				document.all.linkform.oClass.value=coll[i].className;
				
				linkType="update";			
				fBreak=true;
			}
		}
		if(!fBreak) {
			if(trSel.compareEndPoints("StartToEnd",trSel)==0) { // New Link
				linkType="new";
				document.all.linkform.oHref.select();
			}
			else
				linkType="link";			
		}

	}
	

	function linkit() {

		window.dialogArguments.ae_hyperlink(window.dialogArguments.ae_hot,
			document.all.linkform.oHref.value,
			document.all.linkform.oTarget.value,
			document.all.linkform.oStyle.value,
			document.all.linkform.oClass.value,
			document.all.linkform.oName.value
			);

		window.close();
	}
	
</script>
<body onload="initialize()">
<table width="96%" border="0" cellspacing="0" cellpadding="2" align="center" height="100%">
  <tr> 
    <td align="center"> <fieldset style="padding-bottom:5px"><legend><font size="2"><span id="oTitle">超链接</span></font></legend> 
      <table cellpadding="1" cellspacing="2" border="0">
        <form name="linkform"><tr>
          
            <td class="styled"> 链接地址:</td>
            <td colspan="3"> 
              <input type="text" name="oHref" size="35" value="http://">
            </td>
          
        </tr>
        <tr> 
          <td class="styled"> 目标: </td>
          <td colspan="3"> 
            <input type="text" name="oTarget" size="35" value="">
          </td>
        </tr>
        <tr> 
          <td class="styled"> Style: </td>
          <td colspan="3"> 
            <input type="text" name="oStyle" size="35" value="">
          </td>
        </tr>
        <tr> 
          <td class="styled"> Class: </td>
          <td> 
            <input type="text" name="oClass" size="8" value="">
          </td>
          <td class="styled"> Name: </td>
          <td> 
            <input type="text" name="oName" size="8" value="">
          </td>
        </tr>
		</form>
      </table>
         </td>
  </tr>
  <tr>
    <td align="right"> 
      <input name="oInsert" id="oInsert" type="button" value=" 确实 " style="width:64px;" onClick="linkit();">
      <input name="ok2" type="button" value=" 取消 " style="width:64px;" onClick="self.close();">
      &nbsp;</td>
  </tr>
</table>
</body>
</html>
                                                       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -