Flex Text 一些操作
来源:互联网 发布:人工智能服务机器人 编辑:程序博客网 时间:2024/05/16 10:00
1,禁止复制粘贴控制文本
把文本的可选(selectable)选项设置为false
<mx:Text selectable="false" text="This is an example of a multiline text string in a Text control." />
2,TextArea 输入文字,如果使其自动移动要需要的位置。
if (space.length == wordLength){txtAnswer.text += " ";txtAnswer.setSelection(txtAnswer.text.length,txtAnswer.text.length);}
3,文本全局替换
官方文档:
In the following example, only the first instance of "sh" (case-sensitive) is replaced:
var myPattern:RegExp = /sh/; var str:String = "She sells seashells by the seashore."; trace(str.replace(myPattern, "sch")); // She sells seaschells by the seashore.
In the following example, all instances of "sh" (case-sensitive) are replaced because the g
(global) flag is set in the regular expression:
var myPattern:RegExp = /sh/g; var str:String = "She sells seashells by the seashore."; trace(str.replace(myPattern, "sch")); // She sells seaschells by the seaschore.
In the following example, all instance of "sh" are replaced because the g
(global) flag is set in the regular expression and the matches are not case-sensitive because the i
(ignoreCase) flag is set:
var myPattern:RegExp = /sh/gi; var str:String = "She sells seashells by the seashore."; trace(str.replace(myPattern, "sch")); // sche sells seaschells by the seaschore.
- Flex Text 一些操作
- sublime text一些基本操作
- Sublime Text里的一些快捷操作
- flex 中ArrayCollection 的一些操作
- flex text换行
- Flex Text换行
- 操作Text
- flex操作
- 一些Text符号
- jquery如何取得text,areatext,radio,checkbox,select的值,以及其他一些操作
- jquery如何取得text,areatext,radio,checkbox,select的值,以及其他一些操作
- 一些FLEX常用代码
- flex的一些东西!
- flex的一些图例
- Flex 一些用法
- 一些flex教程
- Flex一些例子
- 一些Flex知识
- IT人员必备阅读器:Google Reader
- scroll view 原理
- javascript cookies 存、取、删除实例
- C# FileStream 对象的Seek()方法
- 接口编程 -实例
- Flex Text 一些操作
- 将屏幕分为4个DIV 点击某一个div时 全屏显示
- WCE输入法
- ARM Linux 交叉编译 工具链 制作攻略
- jquery cookie的用法
- setup up shard on mongodb
- 服务器端树状结构如何在客户端显示?
- VTK 三维重建 面绘制
- 对象间的组成关系