English 中文(简体)
我如何在案文领域改变具体案文的背景颜色? 我在网上可使用哪类案文?
原标题:How can I change the background colour of a specific range of text within a text field? What type of text field can I use within my Web App?
  • 时间:2012-01-12 12:48:21
  •  标签:
  • asp.net

我拥有一个有多个版本的网关:文箱领域。 我想能够在这个盒子内改变案文的背景颜色或文字颜色,但只是一个具体的范围,例如头200个特性将有所重复,其余特征应当是绿色的。

我知道,你可以控制一个星号:文字箱场的内容,但我正在利用ASPNetSpell在所有箱子上进行在线校对,使实地成为正文箱。

是否有人对我如何发挥这一功能有任何想法:能否在实地形成部分内容,并申请核对员? 我对任何建议持开放态度。

一切帮助都受到高度赞赏。

劳教

最佳回答

它像ASPNetSpell文本箱一样,成为一片 d子,这样你就能够使用j Query的形式。 你们可以这样做:

$(document).ready(function () {
    $("#aspnetspellbutton").bind("click", function(eventData) {
        var textfrominputelement = $("#yourinputelementid").text().substr(0, 200);
        textfrominputelement.fontcolor("Red");
    });
});

基本上来说,你把 as普韦拉普顿的点击活动交给了 j,然后把头200个文本的特性从印本箱上调,然后把该文本的颜色改为红。

这是一个可怕的例子。 视你的要求,这可能会变得更加复杂。

问题回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签