| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1148 人关注过本帖
标题:使用freetextbox做的一个UBB表情,有点问题,大家来看看
只看楼主 加入收藏
hanjubizu
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-12-21
收藏
 问题点数:0 回复次数:3 
使用freetextbox做的一个UBB表情,有点问题,大家来看看
作了一个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>
搜索更多相关主题的帖子: UBB表情 freetextbox 头像 Default 
2008-03-05 14:34
hanjubizu
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-12-21
收藏
得分:0 
<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>
2008-03-05 14:34
hanjubizu
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-12-21
收藏
得分:0 
<tr>
                                         <td height="25" align="center">
                                             <a   href=javascript:InsertImage(22)> <img src="Images/BBS/image/face/22.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(23)> <img src="Images/BBS/image/face/23.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(24)> <img src="Images/BBS/image/face/24.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(25)> <img src="Images/BBS/image/face/25.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(26)> <img src="Images/BBS/image/face/26.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(27)> <img src="Images/BBS/image/face/27.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(28)> <img src="Images/BBS/image/face/28.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(29)> <img src="Images/BBS/image/face/29.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(30)> <img src="Images/BBS/image/face/30.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(31)> <img src="Images/BBS/image/face/31.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(32)> <img src="Images/BBS/image/face/32.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(33)> <img src="Images/BBS/image/face/33.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(34)> <img src="Images/BBS/image/face/34.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(35)> <img src="Images/BBS/image/face/35.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(36)> <img src="Images/BBS/image/face/36.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(37)> <img src="Images/BBS/image/face/37.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(38)> <img src="Images/BBS/image/face/38.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(39)> <img src="Images/BBS/image/face/39.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(40)> <img src="Images/BBS/image/face/40.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(41)> <img src="Images/BBS/image/face/41.gif" width="19" height="19" /> </a> </td>
                                         <td align="center">
                                             <a   href=javascript:InsertImage(42)> <img src="Images/BBS/image/face/42.gif" width="19" height="19" /> </a> </td>
                                     </tr>
                                 </table>
     </FTB:FreeTextBox>
         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
         </div>
         <asp:Label ID="Label1" runat="server" Text="您的评论:"> </asp:Label>
         <asp:Label ID="Label2" runat="server"> </asp:Label> ?
     </form>
</body>
</html>
2008-03-05 14:35
hanjubizu
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-12-21
收藏
得分:0 
光标定位不到编辑区内部,只要在外边点一下,焦点就跑了,在点头像就跑到外面去了
2008-03-05 14:35
快速回复:使用freetextbox做的一个UBB表情,有点问题,大家来看看
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012822 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved