📄 win_hr.asp
字号:
<html>
<head>
<title>插入水平线</title>
<link rel="stylesheet" href="html_edit.css" type="text/css">
<script language="JavaScript">
var oColor;
oColor="#000000"
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 = 1;//getQueryVariable("instance");
function insertHr()
{
var f = document.all.hrform;
var ae = window.dialogArguments.aeObjects[num];
var hr = "<hr size='" + f.oSize.value + "' align='" + f.oAlign.value + "' width='" + f.oWidth.value + "' color='" + oColor + "' style='" + f.oStyle.value + "'";
if (f.oClass.value.length) { hr+= " class='" + f.oClass.value + "'"; }
if (f.oNoShade.checked) { hr += " noshade"; }
hr += ">";
window.dialogArguments.DHTMLSafe.DOM.selection.createRange().pasteHTML(hr);
window.close();
}
function SelectColor()
{
var c=window.showModalDialog("win_select_color.asp","s","dialogWidth=300px;dialogHeight=270px;status=0");
if(c && c!="")
{
window.document.all.item("oColor").bgColor=c;
oColor=c;
}
}
</script>
</head>
<body bgcolor="menu" style="border:0;overflow: hidden;">
<table border=0><tr><td height=3></td></tr></table>
<table border=0 width="100%">
<form name="hrform">
<tr><td align=center>
<fieldset style="padding-bottom:5px"><legend disabled>插入水平线</legend>
<table cellpadding="1" cellspacing="2" border="0" width="96%">
<tr>
<td class="styled">大小:</td>
<td><input type="text" name="oSize" size="8" value="1"></td>
<td class="styled">对齐:</td>
<td><select name="oAlign" style="width:100px;">
<option selected value="left">居左</option>
<option value="center">居中</option>
<option value="right">居右</option>
</select></td>
</tr>
<tr>
<td class="styled">宽度:</td>
<td><input type="text" name="oWidth" size="8" value="100%"></td>
<td class="styled">颜色:</td>
<td>
<table id="oColor" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="100%" onClick="SelectColor();"><img border="0" src="images/clrbox.gif" width="16" height="16"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="styled">Style:</td>
<td colspan="3"><input type="text" name="oStyle" size="30" value=""></td>
</tr>
<tr>
<td class="styled">Class:</td>
<td><input type="text" name="oClass" size="8" value=""></td>
<td class="styled">无阴影:</td>
<td><input type="checkbox" name="oNoShade" checked></td>
</tr>
</table>
</fieldset>
<table width="98%" border=0 cellpadding=0 cellspacing=0 height="35">
<tr><td align="right"><input type="button" name="OK" value=" 确定 " onclick="insertHr();"> <input type="button" name="B2" value=" 取消 " onclick="window.close();"></td></tr>
</table>
</td></tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -