我已经使用 jQueryMobile 在 phoneGap 中实现了一个适用于iphone 和 android 的应用程序
我的应用程序已经为单个 html 页面完成并且工作正常。
现在为了获得更好的性能,我曾经在单独的多个 html 文件中实现。
在一个 js 文件中,我实现了用于编辑员工信息的代码,如下所示。
EditInfoButton.click(function()
{
var row = backupInformation;
alert(row.Emp_Name);
$('#editEmpName').val(row.Emp_Name);
...
...
});
单击按钮时此处弹出正确结果但未显示在文本框中alert(row.Emp_Name);
在编辑页面的 html 文件中,我使用 jQuery mobile 实现了文本框,如下所示
using **`id = "editEmpName"`**
我的一个 Html 中的文本框:
<div data-role="fieldcontain" >
<label for="Empname" class="ui-input-text" ><b>Employee Name</b></label>
<input name="Empname" type="text" id="editEmpName"/>
</div>
但在 html 页面中,一键操作 onClick="alert(editEmpName)"
popus [object HTMLInputElement]
y 这个[object HTMLInputElement]如何从中获取我的值editEmpName
以及我如何在 texbox 中获得正确的值