📄 hr.htm
字号:
<html>
<head>
<title>插入水平线</title>
<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 = 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("SelectColor.htm","s","dialogWidth=300px;dialogHeight=270px;status=0");
if(c && c!="")
window.document.all.item("oColor").bgColor=c;
oColor=c;
}
</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>
<center>插入水平线
<table cellpadding="1" cellspacing="2" border="0">
<form name="hrform"><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="../editor/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="35" 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></form>
</table>
<br>
<input type="button" name="B1" value=" 确定 " style="width:64px;" onclick="insertHr();">
<input type="button" name="B2" value=" 取消 " style="width:64px;" onclick="window.close();">
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -