本文介绍了Asp.net中Ajax编辑器的字符数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在页面中使用了HTML EDITOR来获取用户的文章。我需要在编辑器上计算用户输入的字符数量.....并修改编辑器中的总字符数......我怎么能这样做?I have used HTML EDITOR in my page for Getting article from user. I need to count the no of characters entered by user on a editor..... And fix the total characters on a editor.....How can i do that?推荐答案 <%@ Page Language="VB" AutoEventWireup="false" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </cc1:ToolkitScriptManager> <asp:UpdatePanel ID="updatePanel1" runat="server"> <ContentTemplate> <cc2:Editor ID="myEditor" runat="server"Height="400px" /> <asp:Button runat="server" Text="Submit content" ID="submit" /> <br /> <br /> <span> HTML:<input type="text" readonly="readonly" id="totalHtml" value=""/> Text:<input type="text" readonly="readonly" id="totalPlain" value=""/> </span> </ContentTemplate> </asp:UpdatePanel> </div> </form></body><script type="text/javascript"> // on Application load Sys.Application.add_load(function() { var editor = Don不要忘记将这篇文章标记为答案,如果它对你有所帮助...... 谢谢 快乐编码... Don''t forget to mark this post as answer, if it helped you... ThanksHappy Coding... 这篇关于Asp.net中Ajax编辑器的字符数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 07:04