Jquery mobile Jquerymobile文本框-onChange事件-在Operamobile浏览器中不起作用

Jquery mobile Jquerymobile文本框-onChange事件-在Operamobile浏览器中不起作用,jquery-mobile,onchange,Jquery Mobile,Onchange,我正在使用jquerymobile alpha 4.1开发示例应用程序。在我的设计中,当最终用户更改控件的值时,我必须从文本框中获取值 所以我使用下面的代码 HTML: <input type="text" id="username" > </input> 它在iphone safari浏览器、Android和黑莓本机浏览器中运行良好 但是它在Operamobile-11和Operamobile-10中不起作用。(它无法检测到此事件的事件。) 请分享你的建议。我应该使用

我正在使用jquerymobile alpha 4.1开发示例应用程序。在我的设计中,当最终用户更改控件的值时,我必须从文本框中获取值

所以我使用下面的代码

HTML:

<input type="text" id="username" > </input>
它在iphone safari浏览器、Android和黑莓本机浏览器中运行良好

但是它在Operamobile-11和Operamobile-10中不起作用。(它无法检测到此事件的事件。)

请分享你的建议。我应该使用任何其他事件来避免此错误吗

谢谢。

试试这个:

$("#username").live("change" , function() {
    alert("hai "+ $("#username").val()); 
});
与此相反:

$("username").live("change" , function() {
    alert("hai"+ $("username").val()); 
});
备选方案:(不带live()):


谢谢你,菲尔。但它在Operamobile10和11浏览器中不起作用。其他浏览器在这个机制中运行良好。@Girija你解决了这个问题吗?我也有同样的问题,Opera Mobile 10在更改事件时不启动吗?
$("username").live("change" , function() {
    alert("hai"+ $("username").val()); 
});
$("#username").change(function() {
    alert("hai "+ $("#username").val()); 
});