![]() |
#2
hanjubizu2008-03-05 14:34
<body onload="getfucos">
<form id="form1" runat="server"> <div> <FTB:FreeTextBox ID="txtDescription" runat="Server" Width="520" Height="500" ButtonOverImage="True" ButtonDownImage="True" ButtonPath="../images/ftb/officeXP/" ToolbarType="OfficeXP"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(1)> <img src="Images/BBS/image/face/1.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(2)> <img src="Images/BBS/image/face/2.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(3)> <img src="Images/BBS/image/face/3.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(4)> <img src="Images/BBS/image/face/4.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(5)> <img src="Images/BBS/image/face/5.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(06)> <img src="Images/BBS/image/face/6.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(07)> <img src="Images/BBS/image/face/7.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(08)> <img src="Images/BBS/image/face/8.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(09)> <img src="Images/BBS/image/face/9.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(10)> <img src="Images/BBS/image/face/10.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(11)> <img src="Images/BBS/image/face/11.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(12)> <img src="Images/BBS/image/face/12.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(13)> <img src="Images/BBS/image/face/13.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(14)> <img src="Images/BBS/image/face/14.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(15)> <img src="Images/BBS/image/face/15.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(16)> <img src="Images/BBS/image/face/16.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(17)> <img src="Images/BBS/image/face/17.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(18)> <img src="Images/BBS/image/face/18.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(19)> <img src="Images/BBS/image/face/19.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(20)> <img src="Images/BBS/image/face/20.gif" width="19" height="19" /> </a> </td> <td align="center" style="height: 25px"> <a href=javascript:InsertImage(21)> <img src="Images/BBS/image/face/21.gif" width="19" height="19" /> </a> </td> </tr> |
作了一个UBB表情,用的一个freetextbox控件,现在情况:要发表表情就要先点击一下freetextbox编辑区,然后点一个头像,可以表现在编辑区里面,连续点一个头像都可以表现,但是如果换第二个头像点击,则会跑到网页的最上面显示,而不是显示在freetextbox里面,除非我在要点第二个之前再点一下编辑区获取焦点才可以,这个问题怎么解决呢,我的代码这么写的,除了这个,都很可以了,大家也可以看看
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false" %>
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www. >
<head runat="server">
<title> Untitled Page </title>
<script language="JavaScript" type="text/JavaScript">
function InsertImage(Folder)
{
var r=txtDescription.document.selection.createRange();
r.pasteHTML(" <img src='Images/BBS/image/face/"+Folder+".gif' /> ");
txtDescription.focus();
}
</script>
</head>