中国开发网: 论坛: 程序员情感CBD: 贴子 106551
haitao
技术贴-系统建议:本BBS系统显示文字的html里,发表部分占了大约15K!
而这些都是一模一样的,建议没脾气把它做成一个js文件,不用每次加载
本来服务器带宽就慢,15K增加了很多的痛苦

<div id="ctl00_placeContent_panMessageEdit">

<h2>信息回复:</h2>
<script>
<!--
function it_submit(form)
{
form.submit.disabled = true;
return true;
}
//-->
</script>
<table width="700" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#000066">
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="3" width="100%" bgcolor="#FAF0E2">


<!-- 已登录 -->
<tr bgcolor="#FAF0E2">
<td width="75" align="right" valign="middle">当前用户:</td>
<td>
<span id="ctl00_placeContent_abcLoginName">haitao</span>
,<a href="../authentication/logout.aspx?return=http://www.cndev.org ">退出登录</a></td>
</tr>

<tr>
<td width="75" align="right" valign="middle" bgcolor="#F2D9B3"><font color="#FF0000">
*</font> 信息主题:</td>
<td bgcolor="#F2D9B3" style="width: 590px">
<input name="ctl00$placeContent$txtTopic" type="text" id="ctl00_placeContent_txtTopic" style="width:400px;" />
</td>
</tr>
<tr>
<td width="75" align="right" valign="top" style="height: 22px">表情:</td>
<td valign="top" colspan="2" style="height: 22px">
<select name="ctl00$placeContent$cboEmotionPages" id="ctl00_placeContent_cboEmotionPages" onchange="callToServer();">
<option value="0">.NET表情</option>
<option value="1">QQ/MSN表情</option>
<option value="2">文字</option>

</select><span id="idSpanNotify"></span>
<br />
<span id="txtResult">
<input type='radio' value='0' name='face' checked>

没有表情<br>

<input type='radio' value='8010' name='face'>

<img src='/_res/faces/face8010.gif' align='absmiddle'><input type='radio' value='8020' name='face'>

<img src='/_res/faces/face8020.gif' align='absmiddle'><input type='radio' value='8030' name='face'>

<img src='/_res/faces/face8030.gif' align='absmiddle'><input type='radio' value='8040' name='face'>

<img src='/_res/faces/face8040.gif' align='absmiddle'><input type='radio' value='8050' name='face'>

<img src='/_res/faces/face8050.gif' align='absmiddle'><input type='radio' value='8060' name='face'>

<img src='/_res/faces/face8060.gif' align='absmiddle'><input type='radio' value='8070' name='face'>

<img src='/_res/faces/face8070.gif' align='absmiddle'><input type='radio' value='8080' name='face'>

<img src='/_res/faces/face8080.gif' align='absmiddle'><input type='radio' value='8090' name='face'>

<img src='/_res/faces/face8090.gif' align='absmiddle'><input type='radio' value='8100' name='face'>

<img src='/_res/faces/face8100.gif' align='absmiddle'><br>

<input type='radio' value='8110' name='face'>

<img src='/_res/faces/face8110.gif' align='absmiddle'><input type='radio' value='8120' name='face'>

<img src='/_res/faces/face8120.gif' align='absmiddle'><input type='radio' value='8130' name='face'>

<img src='/_res/faces/face8130.gif' align='absmiddle'><input type='radio' value='8140' name='face'>

<img src='/_res/faces/face8140.gif' align='absmiddle'><input type='radio' value='8150' name='face'>

<img src='/_res/faces/face8150.gif' align='absmiddle'><input type='radio' value='8160' name='face'>

<img src='/_res/faces/face8160.gif' align='absmiddle'><input type='radio' value='8170' name='face'>

<img src='/_res/faces/face8170.gif' align='absmiddle'><input type='radio' value='8180' name='face'>

<img src='/_res/faces/face8180.gif' align='absmiddle'><input type='radio' value='8190' name='face'>

<img src='/_res/faces/face8190.gif' align='absmiddle'><input type='radio' value='8200' name='face'>

<img src='/_res/faces/face8200.gif' align='absmiddle'></span> </td>
</tr>
<tr>
<td width="75" align="right" valign="top" bgcolor="#F7E7D0">信息内容:</td>
<td bgcolor="#F7E7D0" style="width: 590px">
<textarea name="ctl00$placeContent$txtBody" id="ctl00_placeContent_txtBody" style="height:300px;width:580px;"></textarea>&nbsp;</td>
</tr>
<tr>
<td valign="top" align="right" width="75"><span style="font-family: 宋体">格式:</span></td>
<td width="d" style="width: 590px">
<select name="ctl00$placeContent$cboMsgBodyFormats" id="ctl00_placeContent_cboMsgBodyFormats">
<option selected="selected" value="ubb">UBB代码</option>
<option value="plain">纯文本</option>

</select>
</td>
</tr>
<tr>
<td width="75" align="right" valign="top">&nbsp;</td>
<td width="d" style="width: 590px">
<input type="submit" value="发表" name="submit">
<input type="reset" value="清除" name="reset">
</td>
</tr>
<tr>
<td></td>
<td>辅助工具:<br>
<!-- TAB 头 -->
<table bgcolor="#6699cc" border="0" cellpadding="0" cellspacing="0" id="idTabs" style="color: #ffffff;
display: block" width="100%">
<tr valign="center">
<td class="clsTab" id="tabs" onclick="fnTabClick('0');" width="54"><a class="clsTabLink"
href="javascript: void();" onclick="this.blur(); return fnTabClick('0');">超级连接</a>
</td>
<td class="clsTab" id="tabs" onclick="fnTabClick('1');" width="54"><a class="clsTabLink"
href="javscript:void();" onclick="this.blur(); return fnTabClick('1');">邮件地址</a>
</td>
<td class="clsTab" id="tabs" onclick="fnTabClick('2');" width="30"><a class="clsTabLink"
href="javscript:void();" onclick="this.blur(); return fnTabClick('2');">图片</a> </td>
<td class="clsTab" id="tabs" onclick="fnInert('B');" width="30">粗体</td>
<td class="clsTab" id="tabs" onclick="fnInert('I');" width="30">斜体</td>
<td class="clsTab" id="tabs" onclick="fnInert('CENTER');" width="30">居中</td>
<td class="clsTab" id="tabs" onclick="fnInert('RIGHT');" width="30">居右</td>
<td class="clsTab" id="tabs">&nbsp;</td>
</tr>
</table>
<!-- 第一栏:超级连接 -->
<table border="0" cellpadding="0" cellspacing="0" id="newsContent" width="100%" bgcolor="#6699cc">
<tr>
<td width="100%">连接地址(URL):
<input name="XEdit_linkurl" size="20" value="http://">
网站标题:
<input name="XEdit_linktitle" size="20" title="可选,如果为空,则系统自动将地址显示出来">
<input type="BUTTON" class="cndev-btn-gray" onclick="XEdit_AddUrl();" value="添加">
</td>
</tr>
</table>
<!-- 第二栏:邮件地址 -->
<table border="0" cellpadding="0" cellspacing="0" id="newsContent" width="100%" bgcolor="#6699cc">
<tr>
<td width="100%">邮件地址:
<input name="XEdit_EmailAddress" size="20">
接收人:
<input name="XEdit_EmailName" size="20">
<input type="BUTTON" class="cndev-btn-gray" onclick="XEdit_AddEmail();" value="添加">
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" id="newsContent" width="100%" bgcolor="#6699cc">
<tr>
<td width="100%">图片地址(URL):
<input name="XEdit_ImgUrl" size="20" value="http://">
<input type="BUTTON" class="cndev-btn-gray" onclick="XEdit_AddImg();" value="添加">
</td>
</tr>
</table>
<script language="javascript">
<!--
var formMsg = document.forms["__aspnetForm"];

function callToServer()
{
var param = formMsg["ctl00$placeContent$cboEmotionPages"].value;
var context = "";

idSpanNotify.innerText = "正在读取……";
WebForm_DoCallback('__Page',param,handleResultFromServer,context,OnError)
}

function handleResultFromServer(result, context)
{
txtResult.innerHTML = result;

idSpanNotify.innerText = "";
}

function OnError(message, context)
{
window.alert('An unhandled exception has occurred:\n' + message);
}

function addemotion()
{
var e = emv.value;
if( e=="" )
{
alert("没有选择表情");
return;
}
var c = "<" + "#EM TYPE=" + e + ">";
formMsg["ctl00_placeContent_txtBody"].value += c;
emv.value = "";
}

function fnInert( sInfo )
{
var c = "[" + sInfo + "][/" + sInfo + "]";

formMsg["ctl00_placeContent_txtBody"].value += c;
}

function XEdit_AddUrl()
{
var u = formMsg["XEdit_linkurl"].value;
var t = formMsg["XEdit_linktitle"].value;

if( u == "http://" )
{
alert( "没有输入合理的连接地址。" );
return;
}
var c = "";
if (t!="")
{
c += "[URL=" + u + "]";
c += t;
c += "[/URL]";
}
else
{
c += "[URL]";
c += u;
c += "[/URL]";
}

formMsg["XEdit_linkurl"].value="http://";
formMsg["XEdit_linktitle"].value="";

formMsg["ctl00_placeContent_txtBody"].value += c;
formMsg["ctl00_placeContent_txtBody"].focus();
}

function XEdit_AddEmail()
{
var u = formMsg["XEdit_EmailAddress"].value;
var t = formMsg["XEdit_EmailName"].value;

if( u.indexOf( "@" ) < 0 )
{
alert( "邮件地址不合法。" );
return;
}

var c = "";
if(t != "")
{
c += "[EMAIL=" + u + "]";
c += t;
c += "[/EMAIL]";
}
else
{
c += "[EMAIL]"; c += u; c += "[/EMAIL]";
}

formMsg["ctl00_placeContent_txtBody"].value += c;

formMsg["XEdit_EmailAddress"].value="";
formMsg["XEdit_EmailName"].value="";
formMsg["ctl00_placeContent_txtBody"].focus();
}

function XEdit_AddImg()
{
var u = formMsg["XEdit_ImgUrl"].value;
if( u == "http://" )
{
alert( "没有输入合理的连接地址。" );
return;
}

var c = "";
c += "";

formMsg["ctl00_placeContent_txtBody"].value += c;

formMsg["XEdit_ImgUrl"].value="http://";
formMsg["ctl00_placeContent_txtBody"].focus();
}

function addfont()
{
if( fontface.value == "" && fontsize.value == "" && fontcolor == "" )
{
alert( "没有输入任何字体信息。" );
return;
}
var c = formMsg["ctl00_placeContent_txtBody"].value;
c = c + "<" + "#FONT";

if( fontface.value != "" )
c = c + " FACE="+fontface.value;
if( fontsize.value != "" )
c = c + " SIZE="+fontsize.value;
if( fontcolor.value != "" )
c = c + " COLOR="+fontcolor.value;
c = c + "> <" + "#/FONT>";
formMsg["ctl00_placeContent_txtBody"].value = c;
fontface.value="";
fontsize.value="";
fontcolor.value="";
formMsg["ctl00_placeContent_txtBody"].focus();
}

function addhr()
{
var c = formMsg["ctl00_placeContent_txtBody"].value;
c = c + "<" + "#HR";

if( hrwidth.value != "" )
c = c + " WIDTH="+hrwidth.value;
if( hralign.value != "" )
c = c + " ALIGN="+hralign.value;
c = c + ">";
formMsg["ctl00_placeContent_txtBody"].value = c;
hrwidth.value="";
formMsg["ctl00_placeContent_txtBody"].focus();
}

function fnTabClick( nTab )
{
event.cancelBubble = true;

el = event.srcElement;

for (i = 0; i < newsContent.length; i++)
{
tabs[i].className = "clsTab";
tabs[i].children[0].className = "clsTabLink";
newsContent[i].style.display = "none";
}
newsContent[nTab].style.display = "block";
tabs[nTab].className = "clsTabSelected";
tabs[nTab].children[0].className = "clsTabLinkSelected";
event.returnValue = false;
}
tabs[0].click();
-->
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>

</div></div>

<div>
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" /></div>

<script type="text/javascript">
<!--
var theForm = document.forms['__aspnetForm'];
function __doPostBack(eventTarget, eventArgument) {
if (theForm.onsubmit == null || theForm.onsubmit()) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>


<script src="WebResource.axd?a=s&amp;r=WebForms.js&amp;t=632370666318750000" type="text/javascript"></script>


<script type="text/javascript">
<!--
var pageUrl='/forum/msg.aspx?board=emotion.programmer&amp;id=95148';
WebForm_InitCallback();// -->
</script>
</form>
我的blog:http://szhaitao.blog.hexun.com & http://www.hoolee.com/user/haitao
--以上均为泛泛之谈--
不尽牛人滚滚来,无边硬伤纷纷现 人在江湖(出来的),哪能不挨刀(总归是要的)
网络对话,歧义纷生;你以为明白了对方的话,其实呢?

您所在的IP暂时不能使用低版本的QQ,请到:http://im.qq.com/下载安装最新版的QQ,感谢您对QQ的支持和使用

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录