📄 imageproperties.htm
字号:
<html>
<head>
<title>图片属性</title>
<script language="JavaScript">
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
alert('变量 ' + variable + ' 未发现');
}
var num = getQueryVariable("instance");
var oSel = window.dialogArguments.aeObjects[num].DOM.selection.createRange();
var sAlign = oSel(0).align;
var sAlt = oSel(0).alt;
var sBorder = oSel(0).border;
var sHeight = oSel(0).height;
var sName = oSel(0).nameProp;
var sSrc = oSel(0).src;
var sSize = oSel(0).fileSize;
var sWidth = oSel(0).width;
function init() {
if (sAlign.toLowerCase() == "") {
document.all.oAlign.selectedIndex = 0;
} else if (sAlign.toLowerCase() == "absmiddle") {
document.all.oAlign.selectedIndex = 1;
} else if (sAlign.toLowerCase() == "middle") {
document.all.oAlign.selectedIndex = 2;
} else if (sAlign.toLowerCase() == "bottom") {
document.all.oAlign.selectedIndex = 3;
} else if (sAlign.toLowerCase() == "top") {
document.all.oAlign.selectedIndex = 4;
} else if (sAlign.toLowerCase() == "left") {
document.all.oAlign.selectedIndex = 5;
} else if (sAlign.toLowerCase() == "right") {
document.all.oAlign.selectedIndex = 6;
} else if (sAlign.toLowerCase() == "baseline") {
document.all.oAlign.selectedIndex = 7;
} else if (sAlign.toLowerCase() == "texttop") {
document.all.oAlign.selectedIndex = 8;
} else if (sAlign.toLowerCase() == "absbottom") {
document.all.oAlign.selectedIndex = 9;
}
document.all.oName.innerText = sName;
document.all.oSize.innerText = sSize + " bytes";
document.all.oAlt.value = sAlt;
document.all.oBorder.value = sBorder;
document.all.oHeight.value = sHeight;
document.all.oWidth.value = sWidth;
document.all.oSrc.value = sSrc;
}
function writeProps() {
oSel(0).align = document.all.oAlign.value;
oSel(0).alt = document.all.oAlt.value;
oSel(0).border = document.all.oBorder.value;
oSel(0).height = document.all.oHeight.value;
oSel(0).width = document.all.oWidth.value;
oSel(0).src = document.all.oSrc.value;
oSel.select();
window.close();
}
</script>
<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>
<body onload="init();">
<form id="imgPropForm" style="position:absolute">
<fieldset style="padding-bottom:5px"><legend><font size="2"><span id="oTitle">图片属性</span></font></legend>
<table cellspacing="0" cellpadding="3" border="0" width="370" align="center" >
<tr>
<td class="cellHeading" align="right">图片名:</td>
<td class="input"><span id="oName"></span></td>
</tr>
<tr>
<td class="cellHeading" align="right">大小:</td>
<td class="input"><span id="oSize"></span></td>
</tr>
<tr>
<td class="cellHeading" align="right">对齐:</td>
<td class="input" align="left">
<select id="oAlign">
<option name="" value="" selected> </option>
<option name="absmiddle" value="absmiddle">绝对居中</option>
<option name="middle" value="middle">居中</option>
<option name="bottom" value="bottom">底端</option>
<option name="top" value="top">顶部</option>
<option name="left" value="left">居左</option>
<option name="right" value="right">居右</option>
<option name="baseline" value="baseline">基线</option>
<option name="texttop" value="texttop">文本顶部</option>
<option name="absbottom" value="absbottom">绝对底端</option>
</select>
</td>
</tr>
<tr>
<td class="cellHeading" align="right">说明:</td>
<td class="input" align="left"><input id="oAlt" type="text" size="40"></td>
</tr>
<tr>
<td class="cellHeading" align="right">边框:</td>
<td class="input" align="left"><input id="oBorder" type="text" size="1" value="0"></td>
</tr>
<tr>
<td class="cellHeading" align="right">高度:</td>
<td class="input" align="left"><input id="oHeight" type="text" size="3"></td>
</tr>
<tr>
<td class="cellHeading" align="right">宽度:</td>
<td class="input" align="left"><input id="oWidth" type="text" size="3"></td>
</tr>
<tr>
<td class="cellHeading" align="right" width="70">图片地址:</td>
<td class="input" align="left"><input id="oSrc" type="text" size="40" value="http://"></td>
</tr>
</table>
</fieldset>
<div align="right">
<input name="B1" type="button" value=" 确定 " style="width:64px;" onClick="writeProps();">
<input name="B2" type="button" value=" 取消 " style="width:64px;" onClick="window.close();">
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -