📄 imagemanage.html
字号:
<HTML>
<HEAD>
<title>图片管理程序</title>
<script language="javascript">
function onButtonClick()
{
var Width = document.FileManager.Width.value;
var Height = document.FileManager.Height.value;
var AltText = document.FileManager.AltText.value;
var src = FileManager.FilePicker1.value;
var HSpace = document.FileManager.HSpace.value;
var Align = FileManager.Align.value;
var VSpace = FileManager.VSpace.value;
var Border = FileManager.Border.value;
var imageTag = "src=\"" + src + "\" ";
if(Width!==""){
imageTag += "width='" + Width + "' ";
}
if(Height!=""){
imageTag += "height='" + Height + "' ";
}
if(AltText!==""){
imageTag += "alt='" + AltText + "' ";
}
if(HSpace!==""){
imageTag += "hspace='" + HSpace + "' ";
}
if(Align!=""){
imageTag += "align='" + Align + "' ";
}
if(VSpace!=""){
imageTag += "Vspace='" + VSpace + "' ";
}
if(Border!=""){
imageTag += "border='" + Border + "' ";
}
opener.imageURL = imageTag;
opener.AltText = AltText;
opener.InsertNewImage();
window.close();
}
function onUpdateClick()
{
var Width = document.FileManager.Width.value;
var Height = document.FileManager.Height.value;
var AltText = document.FileManager.AltText.value;
var src = FileManager.FilePicker1.value;
var HSpace = document.FileManager.HSpace.value;
var Align = FileManager.Align.value;
var VSpace = FileManager.VSpace.value;
var Border = FileManager.Border.value;
window.opener.UpdateImage(src,AltText,Align,Border,Width,Height,HSpace,VSpace);
window.close();
}
</script>
<STYLE>
td
{
font-size: 9pt;
font-family: 宋体;
color:black;
border-top: 1px solid #999999;
border-right: 1px solid #999999;
border-bottom: 0px none #999999;
border-left: 1px solid #999999;
}
p
{
font-size: 9pt;
font-family:宋体;
}
input {
font-family: "宋体";
font-size: 9pt;
color: #000000;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<body onload="checkImage()" bgcolor=#CCCCCC leftmargin=0 topmargin=0 >
<form name="FileManager" method="post" id="FileManager">
<TABLE width="300" border="0" align="center" cellPadding="0" cellSpacing="0" id="Table1">
<TR>
<TD width="30%" height="24" align="right" style="border-right: 1px;">图片地址: </TD>
<TD height="24" colSpan="3" align="middle"><input name="FilePicker1" type="text" id="FilePicker1" size="30"></TD>
</TR>
<TR>
<TD width="30%" height="24" align="right" style="border-right: 1px;">说明文字: </TD>
<TD height="24" colSpan="3" align="middle"><input name="AltText" type="text" id="AltText" size="30"></TD>
</TR>
<tr>
<TD width="30%" height="24" align="right" noWrap style="border-right: 1px;">对齐方式:</TD>
<TD width="30%" height="24" align="center" noWrap style="border-right: 1px;">
<SELECT name="Align">
<option value="" selected>选择方式</option>
<option value="left">左对齐</option>
<option value="middle">具中</option>
<option value="right">右对齐</option>
<option value="absbottom">绝对底部</option>
<option value="absmiddle">绝对具中</option>
<option value="baseline">基线</option>
</SELECT></TD>
<TD width="25%" height="24" align="right" noWrap style="border-right: 1px;">边框大小:</TD>
<TD width="15%" height="24" align="center" noWrap>
<INPUT name="Border" type="text" id="Border" size="3" maxlength="1"></TD>
</tr>
<TR>
<TD width="30%" height="24" align="right" style="border-right: 1px;">高度:</TD>
<TD width="30%" height="24" align="center" style="border-right: 1px;">
<INPUT name="Height" type="text" id="Height" size="3" maxlength="3">
</TD>
<TD width="25%" height="24" align="right" noWrap style="border-right: 1px;">水平距离:</TD>
<TD width="15%" height="24" align="center" noWrap>
<INPUT name="HSpace" type="text" id="HSpace" size="3" maxlength="1">
</TD>
</TR>
<TR>
<TD width="30%" height="24" align="right" style="border-right: 1px;">宽度:</TD>
<TD width="30%" height="24" align="center" style="border-right: 1px;">
<INPUT name="Width" type="text" id="Width" size="3" maxlength="3"></TD>
<TD width="25%" height="24" align="right" noWrap style="border-right: 1px;">垂直距离:</TD>
<TD width="15%" height="24" align="center" noWrap>
<INPUT name="VSpace" type="text" id="VSpace" size="3" maxlength="1"></TD>
</TR>
<TR align="center">
<TD height="24" colSpan="4" style="border-bottom: 1px solid #999999;"><span id="btnImgInsert" style="display:none">
<INPUT onclick="onButtonClick();" type="button" value="插入图象">
</span> <span id="btnImgUpdate" style="display:none">
<INPUT onclick="onUpdateClick();" type="button" value="修改图象">
</span> </td>
</tr>
</TABLE>
<P align="center"> <INPUT id="iURL" name="IURL" style="WIDTH: 363px; HEIGHT: 22px" type="hidden" size="55" disabled readOnly></P>
</form>
<SCRIPT language="javascript">
function checkImage()
{
//alert (window.opener.HTMLEditor.InnerHTML);
var oSel = window.opener.HTMLEditor.document.selection.createRange()
var sType = window.opener.HTMLEditor.document.selection.type
if ((oSel.item) && (oSel.item(0).tagName=="IMG")) //If image is selected
{
// selectImage(oSel.item(0).src)
document.all.FilePicker1.value = oSel.item(0).src
document.all.AltText.value = oSel.item(0).alt
document.all.Align.value = oSel.item(0).align
document.all.Border.value = oSel.item(0).border
document.all.Width.value = oSel.item(0).width
document.all.Height.value = oSel.item(0).height
document.all.HSpace.value = oSel.item(0).hspace
document.all.VSpace.value = oSel.item(0).vspace
document.all.btnImgUpdate.style.display="block";
//document.all.btnImgUpdate.style.visible=false;
}
else
{
document.all.btnImgInsert.style.display="block";
//document.all.btnImgInsert.visible=false;
}
}
</SCRIPT>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -