You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
klintersrv/editor/dialog/marquee.htm

102 lines
2.4 KiB

3 months ago
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript src="dialog.js"></script>
<link href='dialog.css' type='text/css' rel='stylesheet'>
<script language=javascript>
var sAction = "INSERT";
var sTitle = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
var sel = dialogArguments.eWebEditor.document.selection.createRange();
sel.type = dialogArguments.eWebEditor.document.selection.type;
var el;
var sText = "";
var sBehavior = "";
if (sel.type=="Control") {
if (sel.item(0).tagName=="MARQUEE"){
sAction = "MODI";
sTitle = "<EFBFBD>޸<EFBFBD>";
el = sel.item(0);
sBehavior = el.behavior;
sText = el.innerHTML;
}
}
document.write("<title><EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(" + sTitle + ")</title>");
function check(){
sBehavior = event.srcElement.value;
}
function InitDocument() {
d_text.value = sText;
switch (sBehavior) {
case "scroll":
document.all("d_behavior")[0].checked = true;
break;
case "slide":
document.all("d_behavior")[1].checked = true;
break;
default:
sBehavior = "alternate";
document.all("d_behavior")[2].checked = true;
break;
}
adjustDialog();
}
function ok(){
sText = d_text.value;
if (sAction == "MODI") {
el.behavior = sBehavior;
el.innerHTML = sText;
}else{
dialogArguments.insertHTML("<marquee behavior='"+sBehavior+"'>"+sText+"</marquee>");
}
window.returnValue = null;
window.close();
}
</script>
</HEAD>
<body onload="InitDocument()">
<table border=0 cellpadding=0 cellspacing=5 id=tabDialogSize><tr><td>
<table border=0 cellpadding=0 cellspacing=0 align=center>
<tr><td>
<FIELDSET>
<LEGEND></LEGEND>
<table border=0 cellspacing=0 cellpadding=5 width="100%">
<tr><td>
<table border=0 cellspacing=2 cellpadding=0 width="100%">
<tr>
<td noWrap width="20%"><EFBFBD>ı<EFBFBD>:</td>
<td noWrap width="80%"><input type=text id="d_text" size=40 value=""></td>
</tr>
<tr>
<td noWrap width="20%"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td noWrap width="80%"><input onclick="check()" type="radio" name="d_behavior" value="scroll"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <input onclick="check()" type="radio" name="d_behavior" value="slide"> <EFBFBD>õ<EFBFBD>Ƭ <input onclick="check()" type="radio" name="d_behavior" value="alternate"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
</table>
</td></tr>
</table>
</FIELDSET>
</td></tr>
<tr><td height=10></td></tr>
<tr><td noWrap align=right><input type=submit value=<EFBFBD><EFBFBD>' id=Ok onclick="ok()">&nbsp;&nbsp;<input type=button value=<EFBFBD><EFBFBD>' onclick="window.close();"></td></tr>
</table>
</td></tr></table>
</body>
</html>