textbox
The 'textbox' function displays the given text in a popup window for end-users to view or edit the text;
'textbox'函数提供弹窗让用户查看和编辑文本
Prototype: textbox({
- sTitle: '',
- sDescr: '',
- sTxt: '',
- sBtnOK: '',
- sSyntax: '',
- bReadOnly: true,
- bWordwrap: true,
- bRich: false,
- nWidth: 50,
- nHeight: 60
})
Parameters: an object containing,
- sTitle: the popup window title;
弹窗标题 - sDescr: a descriptive text;
描述 - sTxt: text to be shown in the popup window;
在弹窗中显示的文本 - sBtnOK: label text to be shown on the OK button;
OK按钮上显示的文字 - sSyntax: specifies in which language to syntax-highlight the text; Currently only 'html' is supported;
语法高亮,现只支持html - bReadOnly: specifies if the text is read-only or editable by end-users;
显示文本只读还是可被编辑 - bWordwrap: specifies if or not to wrap the text by the window size;
文本是否自动换行 - bRich: specifies if or not to show the text with HTML formatting;
是否以html格式显示文本 - nWidth: specifies a percent number of the window width on the screen;
定义弹窗宽度 - nHeight: specifies a percent number of the window height on the screen;
定义弹窗高度
- sTitle: the popup window title;
Return Value: if the text is shown for editing and the 'OK' button is pressed, the user input is returned; Otherwise, the return value is undefined;
Example:
var sRes=textbox({sTxt: 'process information...', bReadOnly: true});