Jquerymobile页面内容保存在数据库中并以相同格式检索它

时间:2012-08-29 09:46:39

标签: jquery jquery-mobile

我的要求是用户将在单独的编辑器中编辑模板的内容 单击模板中的编辑按钮后。之后,修改后的内容将保存到数据库中。

根据定义的例子: 我在屏幕上动态创建了一个按钮,并在运行时更改它并保存 数据库中的内容,但之后我在EDIT模式下打开它 显示其增强的JQM记录了我保存的内容。 请提供一种在数据库中保存相同内容的实际方法。

enter code here :Im trying to save - <a href="#somelink" data-role="button" data-icon="hello">Button</a>


its shown in EDIT mode : <a class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-left ui-btn-up-a" data-icon="hello" data-iconpos="left" data-role="button" href="#somelink" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="a">
 <span class="ui-btn-inner ui-btn-corner-all">
     <span class="ui-btn-text">Button</span>
     <span class="ui-icon ui-icon-hello ui-icon-shadow">&nbsp;</span>
 </span>

我正在尝试收听pagecreate或pageinit事件。 感谢

1 个答案:

答案 0 :(得分:0)

您必须将Edit框包装在data-enhance="false"

的容器中

请参阅JQueryMobile Data Attributes Reference Page.

中的Enhancement部分