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

📄 win_img_edit.asp

📁 是个不错的文件代码,希望大家好好用,
💻 ASP
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图片属性</title>
<link rel="stylesheet" href="html_edit.css" type="text/css">
<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();
}

function is_int()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
</head>
<body onload="init();" bgcolor="menu" style="border:0;overflow:	hidden;">
<table border=0><tr><td height=3></td></tr></table>
<table border=0 width="100%">
<form id="imgPropForm" style="position:absolute">
<tr><td align=center>
  <fieldset style="padding-bottom:5px"><legend disabled>图片属性</legend> 
    <table border="0" cellpadding=0 cellspacing=2 width="98%" align="center">
    <tr>
    <td class="cellHeading">名称:<span id="oName"></span></td>
    <td class="cellHeading">大小:<span id="oSize"></span></td>
    </tr>
    <tr>
    <td class="cellHeading">宽度:<input id="oWidth" type="text" onKeyPress="event.returnValue=is_int();" size="5" maxlength="4">&nbsp;像素</td>
    <td class="cellHeading">高度:<input id="oHeight" type="text" onKeyPress="event.returnValue=is_int();" size="5" maxlength="4">&nbsp;像素</td>
    </tr>
    <tr>
    <td class="cellHeading">边框:<input id="oBorder" type="text" onKeyPress="event.returnValue=is_int();" size="5" maxlength="4">&nbsp;像素</td>
    <td class="cellHeading">对齐:<select id="oAlign">
<option name="" value="" selected>&nbsp;</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" colspan=2>地址:<input id="oSrc" type="text" size="35" value="http://"></td>
    </tr>
    <tr>
    <td class="cellHeading" colspan=2>说明:<input id="oAlt" type="text" size="35"></td>
    </tr>
    </table>
  </fieldset>
  <table width="98%" border=0 cellpadding=0 cellspacing=0 height="35">
  <tr><td 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();"></td></tr>
  </table>
</td></tr>
</form>
</table>
</body>
</html>                                                            

⌨️ 快捷键说明

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