JQuery Mobile未在IE Mobile上工作。(MVC)
我在MVC应用程序中创建了一个小型移动界面,基本上需要将从选择列表中选择的号码提交到服务器 代码: 当我开发它的时候,我使用一个代理切换的chrome插件测试了这个界面,它似乎工作得很好 代理字符串: 与Mozilla/4.0兼容;msie7.0;WindowsPhoneOS7.0;三叉戟/3.1; IEMobile/7.0;诺基亚;N70 但是它不能在需要使用接口的设备上工作。我所能告诉你的是,你一直试图在这个设备上窥探某个特定的IE版本,但没有结果,那就是它的windows mobile和某种形式的pocket IE手机 保存按钮文本应根据从服务器发回的文本确定。然后我需要能够执行一个简单的submit/ajax调用。JQuery Mobile未在IE Mobile上工作。(MVC),jquery,asp.net-mvc,asp.net-mvc-3,jquery-mobile,ie-mobile,Jquery,Asp.net Mvc,Asp.net Mvc 3,Jquery Mobile,Ie Mobile,我在MVC应用程序中创建了一个小型移动界面,基本上需要将从选择列表中选择的号码提交到服务器 代码: 当我开发它的时候,我使用一个代理切换的chrome插件测试了这个界面,它似乎工作得很好 代理字符串: 与Mozilla/4.0兼容;msie7.0;WindowsPhoneOS7.0;三叉戟/3.1; IEMobile/7.0;诺基亚;N70 但是它不能在需要使用接口的设备上工作。我所能告诉你的是,你一直试图在这个设备上窥探某个特定的IE版本,但没有结果,那就是它的windows mobile和某
我最好的猜测是,移动IE和它的老大哥一样喜怒无常,而jQueryMobile在这方面不起作用。如果是这样的话,我怎么能在不发帖的情况下给服务器打电话呢?这只是目前的部分回答。我会更新并标记为解决后,我已经解决了:P 最后我带着JQuery手机出去了。我现在的观点是这样的。IE Mobile上的on Change事件仍然没有启动,但当我在另一个代理下在chrome中运行它时,它会工作,表单至少会提交fridgeNo
@{
ViewBag.Title = "Freezer Status";
}
@using (Html.BeginForm("ClockFridgeTime", "BlastFreezer", FormMethod.Get, new { name = "UpdateForm" }))
{
<div style="width: 210px">
<div>
@Html.DropDownList("fridgeNo", (List<SelectListItem>)ViewBag.Options, new { onChange = "PostForm(this, '/Index')", Style = "width:160px; height 80px;" })
</div>
<br />
<div>
<input type="submit" id="submit" value="@ViewBag.FridgeStatus" style="width: 200px; height:80px" />
</div>
</div>
}
<script type="text/javascript">
function PostForm(btnClicked, newLocation) {
var $form = $(btnClicked).parents('UpdateForm');
$.ajax({
type: "GET",
url: document.UpdateForm.action.replace('/ClockFridgeTime', newLocation.toString()) + "?fridgeNo=" + document.getElementById('fridgeNo').value,
success: function (response) {
document.body.innerHTML = response;
}
});
return false;
}
</script>
@{
ViewBag.Title = "Freezer Status";
}
@using (Html.BeginForm("ClockFridgeTime", "BlastFreezer", FormMethod.Get, new { name = "UpdateForm" }))
{
<div style="width: 210px">
<div>
@Html.DropDownList("fridgeNo", (List<SelectListItem>)ViewBag.Options, new { onChange = "PostForm(this, '/Index')", Style = "width:160px; height 80px;" })
</div>
<br />
<div>
<input type="submit" id="submit" value="@ViewBag.FridgeStatus" style="width: 200px; height:80px" />
</div>
</div>
}
<script type="text/javascript">
function PostForm(btnClicked, newLocation) {
var $form = $(btnClicked).parents('UpdateForm');
$.ajax({
type: "GET",
url: document.UpdateForm.action.replace('/ClockFridgeTime', newLocation.toString()) + "?fridgeNo=" + document.getElementById('fridgeNo').value,
success: function (response) {
document.body.innerHTML = response;
}
});
return false;
}
</script>