简体   繁体   English

仅使用纯CSS或javascript或jquery将样式添加到文本区域

[英]add styling to text area with pure css or javascript or jquery alone

I am trying to check if it is possible to add the styling to textbox similar to the ones used by yahoo for the To field in compose page.. replacing the email id with the name inside a wrapper.. i want to know if this can be achieved using css or javscript?? 我正在尝试检查是否可以将样式添加到类似于Yahoo撰写页面中“收件人”字段所使用的样式。用包装器内的名称替换电子邮件ID。我想知道是否可以使用CSS或JAVScript实现? I will attach a snap so that you can see what Im trying to acheive here.. I wil also add a fiddle link of whta Ive tried and failed 我将附加一个快照,以便您可以在此处看到我正在尝试实现的目标。.我还将添加一个我尝试过但失败了的小提琴链接 在此处输入图片说明

http://jsfiddle.net/sztnN/2/ http://jsfiddle.net/sztnN/2/

What JavaScript does here is it converts normal <input> or <textarea> elements to probably <div> elements that hold the values. JavaScript在这里的作用是将普通的<input><textarea>元素转换为可能包含值的<div>元素。 Here is an example and a guide on how you can achieve that in JQuery: 这是一个示例和有关如何在JQuery中实现该目标的指南:

http://www.devthought.com/projects/jquery/textboxlist/ http://www.devthought.com/projects/jquery/textboxlist/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM