📄 sendmsg.aspx
字号:
rng.moveToPoint(event.x,event.y);
rng.moveStart("character",-event.srcElement.value.length) ;
count = rng.text.length ;
}
function Openuppage(obj)
{
window.open("Upfile.aspx", "", "height=400, width=600, top=200, left=300, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") ;
//
// var cityname = document.getElementById("City");
// cityname.options.add(new Option("北京市","北京市"));
// cityname.value=cityname.options[1].value;
// // alert( cityname.value);
//
}//
function ImageSel(obj,obj2)
{
//////////////////////////////////
txt=obj.options[obj.selectedIndex].value;
// txt="UpLoad/"+txt;
var e =document.getElementById("Content");
var rng2 = e.createTextRange();
// temp="jf";
var rng = e.createTextRange();
//取光标前的文本串
rng2.moveEnd("character",-e.value.length) ;
rng2.moveStart("character",-e.value.length) ;
rng2.collapse(true);
rng2.moveEnd("character",count) ;
rng2.moveStart("character",0) ;
rng2.select();
temp=rng2.text;
// count=rng2.text;
// rng.moveEnd("character",-e.value.length) ;
// rng.moveStart("character",-e.value.length) ;
// ;
// rng.collapse(true);
// rng.moveEnd("character",-e.value.length) ;
// rng.moveStart("character",count)
//
//
// rng.select();
//temp2= rng.text;
//光标后的文本串
var sel = rng.duplicate();
sel.moveStart("character", count);
//sel.setEndPoint("EndToStart", rng);
sel.select();
temp2=sel.text;
obj2.value=temp +"[image]";
// obj.value=obj.value+txt+"</marquee> ";
//
obj2.value=obj2.value+txt+"[/image]"+temp2;
count=obj2.value.length;
// movePoint( ) ;
obj2.focus();
//定位光标
var r =e.createTextRange();
r.moveStart('character', count);
r.collapse(true);
r.select();
//////////////////////////////////
// var cityname = document.getElementById("ImgList");
// // cityname.options.add(new Option("sdf ","选择图片"));
//
//// cityname.
//// alert(document.all.day.options.length);
// //document.getElementsByTagName("SELECT").length
// // cityname.selectedIndex=cityname..options.length-1;
// cityname.value=cityname.options[0].value ;
obj.value=obj.options[0].value ;
//----------------------------------------------------------------------
// // ListItem li=new ListItem();
//li=obj.FindByValue("选择图片");
//int j= DropDownList1.Items.IndexOf(li);
//if(j>=0)//存在kk
//DropDownList1.Items[j].Selected=true;
//
}
function GetList(obj)
{
context=imgspan;
context.innerHTML = "<IMG SRC='images/pie.gif' />数据加载中...";
arg = "boundimg|" ;
//调用server端函数并传参数
<%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveData", "context")%>;
//
}
function ReceiveData(result, context)
{ //
// alert("asdf");
context.innerHTML = result;
}
function Button1_onclick( context,obj)
{
context.value=obj.value;
// context.innerHTML=Content.value;
// PreView.innerHTML=obj.value;
}
function CallView(obj)
{
obj.focus();
count=obj.value.length;
// var obj = event.srcElement;
var txt =obj.createTextRange();
txt.moveStart('character',obj.value.length);
txt.collapse(true);
txt.select();
context =PreView;
context.innerHTML = "<IMG SRC='PICTURE/pie.gif' />数据加载中...";
arg = "ViewMethod|"+obj.value;
//调用server端函数并传参数 // |------------------------------------------------ ( 对应1 )
<%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData2", "context")%>;
}
//
function ReceiveServerData2(result, context)
{ //
context.innerHTML = result;
}
function Clear_onclick(obj) {
obj.value="";
}
// ]]>
</script>
</head>
<body style="text-align: center; background-image: url(PICTURE/back.gif);">
<form id="form1" runat="server">
<div>
<uc1:LeadHead ID="LeadHead1" runat="server" />
<asp:Image ID="Image5" runat="server" Height="29px" ImageUrl="~/PICTURE/line.bmp"
Width="930px" />
<div style="text-align: center">
<center style="word-break:break-all; word-wrap:break-word; display: block; position: static; ">
<table border="0" cellpadding="0" cellspacing="0" style="width: 904px">
<tr>
<td style="width: 100px; text-align: left">
<span id="PreView" style="width: 400px; height: 500px; vertical-align: top; text-align: left;">
<asp:Label ID="ViewLab" runat="server" Width="934px" /></span>
</td>
</tr>
</table>
</center>
<table style="width: 686px; height: 103px" border="1" cellpadding="1" cellspacing="1">
<caption style="background-color: #bcddff" id="dvMain" runat="server">
<asp:Image ID="Image1" runat="server" Height="75px" ImageUrl="~/PICTURE/liuyan.gif"
Width="104px" /></caption>
<tr>
<td style="vertical-align: middle; width: 155px; text-align: left; height: 10px;">
<strong>接收留言人:</strong></td>
<td style="vertical-align: top; width: 514px; text-align: left; height: 10px;">
<asp:TextBox ID="UserID" runat="server" Width="255px"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Larger" Text="*个人或班级"
Width="116px"></asp:Label></td>
</tr>
<tr>
<td style="vertical-align: middle; width: 155px; text-align: left">
<strong>留言主题:</strong></td>
<td style="vertical-align: top; width: 514px; text-align: left">
<asp:TextBox ID="Title" runat="server" Width="257px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="" rowspan="2" style="vertical-align: middle; width: 155px; text-align: left">
<strong>留言心情:<br />
</strong>
</td>
<td rowspan="" style="vertical-align: top; width: 514px; height: 21px; text-align: left">
<asp:RadioButton ID="RadioButton1" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face1.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" Checked="True" />
<asp:RadioButton ID="RadioButton2" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face2.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton3" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face3.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton4" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face4.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton5" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face5.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton6" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face6.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton7" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face7.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton8" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face8.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton9" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face9.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" /></td>
</tr>
<tr>
<td style="vertical-align: middle; width: 514px; text-align: left">
<asp:RadioButton ID="RadioButton10" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face10.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton11" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face11.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton12" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face12.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton13" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face13.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton14" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face14.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton15" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face15.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton16" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face16.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton17" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face17.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" />
<asp:RadioButton ID="RadioButton18" runat="server" Height="16px"
Text='<img src="Pic_SendMsg/face16.gif" alt="" style="width: 24px; height: 21px"/>' Width="47px" GroupName="heart" /></td>
</tr>
<tr>
<td rowspan="3" style="vertical-align: top; width: 155px; text-align: left">
<strong style="vertical-align: top; text-align: right; width: 150px;"> 留言内容:<br />
</strong></td>
<td style="vertical-align: top; width: 514px; text-align: left;">
<img onclick="bold(Content)" alt="字体变粗" src="Pic_SendMsg/bold.gif" />
<img onclick="italicize(Content)" alt="字体斜体 " src="Pic_SendMsg/italicize.gif" />
<img onclick="underline(Content)" alt="下划线" src="Pic_SendMsg/underline.gif" />
<img onclick=" hyperlink(Content)" alt="超链接" src="Pic_SendMsg/hyperlink.gif" />
<img onclick="image(Content)" alt="插入图片Url" src="Pic_SendMsg/image.gif" />
<img onclick="move(Content)" alt="字幕滚动" src="Pic_SendMsg/move.gif" />
<img onclick="Openuppage(ImgList)" alt="上传图片" src="Pic_SendMsg/quote.gif" id="IMG1" />
<img onclick="GetList(ImgList)" alt="刷新列表" src="PICTURE/swf.gif" id="Img2" /> <span id="imgspan"><asp:DropDownList ID="ImgList" runat="server"
DataTextField="Title" DataValueField="Title" Width="202px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" DataSourceID="SqlDataSource1">
</asp:DropDownList></span>
</td>
</tr>
<tr>
<td style="vertical-align: middle; width: 514px; text-align: left; height: 26px;">
字体:<select
onchange="fontSel(this,Content)"
name="font" id="Select1" runat="server"><option value="字体" >字体</option> <option value="宋体" >宋体</option> <option
value="楷体_GB2312">楷体</option> <option value="新宋体">新宋体</option>
<option value="黑体">黑体</option> <option value="隶书">隶书</option>
<option value="Andale Mono">Andale Mono</option> <option
value="Arial">Arial</option> <option value="Arial Black">Arial
Black</option> <option value="Book Antiqua">Book
Antiqua</option> <option value="Century Gothic">Century
Gothic</option> <option value="Comic Sans MS">Comic Sans
MS</option> <option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option> <option
value="Impact">Impact</option> <option
value="Tahoma">Tahoma</option> <option
value="Times New Roman">Times New Roman</option> <option
value="Trebuchet MS">Trebuchet MS</option> <option
value="Script MT Bold">Script MT Bold</option> <option
value="Stencil">Stencil</option> <option
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -