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

📄 edit_image.html

📁 DHTML RichText editor for web developers
💻 HTML
字号:
<!-- Include the Free Rich Text Editor Variables Page -->
<script src="../config.js" type="text/javascript" language="javascript"></script>
<script>
if (window.getSelection)
{
	var selected_obj = window.opener.document.getElementById(rteName).contentWindow.window.getSelection().focusNode;
}
else if (document.getSelection)
{
	var selected_obj = window.opener.document.getElementById(rteName).contentWindow.document.getSelection().focusNode;
}
else if (document.selection)
{
	var selected_obj = window.opener.document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();
}
function rteInsertHTML() {
if (document.getElementById("url").value == "")
{
	alert('The URL field must be filled in.');
}
else
{
		var current_tag = selected_obj;
		var previous_tagName = selected_obj.tagName;
		while(previous_tagName != "HTML"){
			if (previous_tagName == "A") {
				current_tag.href = document.getElementById("url").value;
				current_tag.target = document.getElementById("target").value;
				break;
			}
				current_tag = current_tag.parentNode;
				previous_tagName = current_tag.tagName;
		}
	window.close();
}
}
</script>
<style>
body, td {
background-color:#ECE9D8;
font-family:arial;
font-size:11px;
}
input {
font-family:arial;
font-size:11px;
}
select {
font-family:arial;
font-size:11px;
}
</style>
<fieldset>
<legend><b>Edit Link </b></legend>
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td align="right">URL: </td>
<td><input type="text" id="url" style="width:150px;"></td>
</tr>
<tr>
  <td align="right">Target</td>
  <td><select id="target">
    <option selected="selected"> </option>
    <option value="_blank">_blank</option>
    <option value="_parent">_parent</option>
    <option value="_self">_self</option>
    <option value="_top">_top</option>
  </select></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>
<div align="center"><input type="button" value="Edit Link" onClick="rteInsertHTML();">
</div>
</fieldset>
<script>
		var current_tag = selected_obj;
		var previous_tagName = selected_obj.tagName;
		while(previous_tagName != "HTML"){
			if (previous_tagName == "A") {
				document.getElementById("url").value = unescape(current_tag.href);
				document.getElementById("target").value = unescape(current_tag.target);
			}
				current_tag = current_tag.parentNode;
				previous_tagName = current_tag.tagName;
		}

</script>

⌨️ 快捷键说明

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