My:editor

出自Manyou开发者指南

跳转到: 导航, 搜索

目录

描述

创建一个表单,表单的列数为 2(类似于编辑个人资料的表单),行数由 my:editor 标签的子标签指定。例如,用 my:editor-text 标签可以添加一个带有一个文本框的一行(文本框显示在表单的右列),而 my:editor-* 标签的 label 属性指定显示在左列的文字。

注意: 表单的提交方式为 POST。


属性

必选性参数名类型描述
必须 action string 表单 POST 的 URL 地址
可选 width int 表单宽度,单位为像素。(默认值为 425)
labelwidth int 表单左列宽度,单位为像素。(默认值为 75) 注意: 此值不能为 0,如果您不想显示左列,请设定为 1。


范例

<my:editor action="?do-it" labelwidth="100"> <my:editor-text label="标题" name="title" value=""/> <my:editor-text label="作者" name="author" value=""/> <my:editor-custom label="状态"> <select name="state"> <option value="0" selected="selected">已阅读过</option> <option value="1">正在阅读</option> <option value="2">很想阅读</option> </select> </my:editor-custom> <my:editor-textarea label="评论" name="comment"/> <my:editor-buttonset> <my:editor-button value="添加"/> <my:editor-button value="添加2"/> <my:editor-cancel /> </my:editor-buttonset> </my:editor>
Image:MYML_Editor.gif


说明

目前使用 my:editor 标签还无法实现 AJAX 效果,但是您可以使用与 my:editor 等价的 HTML 代码来实现。

本标签可以包含以下子标签:

个人工具
接口文档