且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Flex : 按钮就像退格键一样

更新时间:2022-12-19 17:39:01

您可以使用 ASCII 码 8 并将其转换为字符或使用转义字符 '\b'

You can use the ASCII code 8 and translate it to a char or use the escape character '\b'

或者你可以操作 textFieldInstance 对象:

or you can manipulate the textFieldInstance object:

textFieldInstance.text = textFieldInstance.text.substr( 0, -1 );

见:

http://board.flashkit.com/board/showthread.php?t=246003

http://www.java2s.com/Code/Flash-Flex-ActionScript/String/InsertingSpecialWhitespaceCharactersBackspaceb.htm

http://www.wipeout44.com/brain_food/flash_actionscript_goodies.asp

http://www.ultrashock.com/forums/actionscript/deleting-chars-in-a-text-field-eg-backspace-124649.html