📄 image.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>双鱼文本编辑器PiscesTextEditor</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="htm.css">
<script language="JavaScript">
function checkchange()
{
if (chkSize.checked){
width.disabled=false;
height.disabled=false;
}
else{
width.disabled=true;
height.disabled=true;
width.value = "";
height.value = "";
showimage();
}
}
function showimage(){
sFromUrl = imgurl.value;
sBorder = border.value;
sAlign = aligntype.value;
sWidth = width.value;
sHeight = height.value;
var sHTML = '<img src="'+sFromUrl+'" border="'+sBorder+'" align="'+sAlign+'"';
if (sWidth!=""){
sHTML=sHTML+' width="'+sWidth+'"';
}
if (sHeight!=""){
sHTML=sHTML+' height="'+sHeight+'"';
}
sHTML = sHTML+'>';
if (sFromUrl.length<10){sHTML='';}
document.getElementById('showimage').innerHTML = sHTML;
}
function image(){
var imghtml="";
var strurl=imgurl.value;
if (strurl==""||strurl=="http://") return;
strtype=strurl.substring(strurl.length-3,strurl.length);
strtype=strtype.toLowerCase();
if (strtype=="jpg"||strtype=="gif"){
imghtml+="<img src='"+imgurl.value+"' align='"+aligntype.value+"'";
if (alttext.value!="") imghtml=imghtml+" alt='"+alttext.value+"'";
if (border.value!="") imghtml=imghtml+" border='"+border.value+"'";
if (chkSize.checked){
if (width.value!="") imghtml=imghtml+" width='"+width.value+"'";
if (height.value!="") imghtml=imghtml+" height='"+height.value+"'";
}
imghtml=imghtml+">";
window.returnValue = imghtml;
}
window.close();
}
</script>
</Head>
<BODY>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<FIELDSET align=left>
<LEGEND align=left>插入图片</LEGEND>
<table width="400" border="0" align="center">
<tr>
<td height="30" align="left">URL</td>
<td height="30" colspan="3" align="left"><input name="imgurl" type="text" id="imgurl" value="http://" size="48" onKeyUp="showimage()"></td>
</tr>
<tr>
<td align="left" width="15%">替换文字</td>
<td width="35%" height="30" align="left"><input name="alttext" type="text" id="alttext" size="18"></td>
<td width="15%">对齐方式</td>
<td width="35%" height="30"><select name="aligntype" id="select" onChange="showimage();">
<option value="" selected>默认</option>
<option value="left">左对齐</option>
<option value="right">右对齐</option>
<option value="top">顶边对齐</option>
<option value="texttop">文字上方</option>
<option value="middle">相对垂直居中</option>
<option value="absmiddle">绝对垂直居中</option>
<option value="baseline">基线</option>
<option value="bottom">相对底边对齐</option>
<option value="absbottom">绝对底边对齐</option>
<option value="center">居中</option>
</select></td>
</tr>
<tr>
<td align="left">图片大小</td>
<td height="30" align="left"><input name="chkSize" type="checkbox" id="chkSize" value="checkbox" onChange="checkchange();">
<label for="chkSize">指定大小</label></td>
<td>边框粗细</td>
<td height="30"><input name="border" type="text" id="border" value="0" size="5" onpaste="return !clipboardData.getData('text').match(/\D/)" onKeyPress="event.returnValue=(event.keyCode>=48)&&(event.keyCode<=57);">
像素</td>
</tr>
<tr>
<td align="left">宽</td>
<td height="30" align="left"><input name="width" type="text" id="width" size="5" onpaste="return !clipboardData.getData('text').match(/\D/)" onKeyPress="event.returnValue=(event.keyCode>=48)&&(event.keyCode<=57);" disabled>
像素 </td>
<td>高</td>
<td><input name="height" type="text" id="height" size="5" onpaste="return !clipboardData.getData('text').match(/\D/)" onKeyPress="event.returnValue=(event.keyCode>=48)&&(event.keyCode<=57);" disabled>
像素</td>
</tr>
<tr>
<td height="40" colspan="4" align="center"><input name="cmdOK" type="button" class="button" id="cmdOK" onClick="image();" value="确定">
<input name="close" type="button" class="button" id="close" onClick="window.close();" value="取消"></td>
</tr>
</table>
</FIELDSET>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<FIELDSET align=left>
<LEGEND align=left>图片预览</LEGEND>
<table cellpadding="0" cellspacing="0" border="0" width="400">
<tr>
<td height="150" id="showimage"></td>
</tr>
</table>
</FIELDSET>
</td>
</tr>
</table>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -