0
我正在使用Jquery mobile和MVC4在VS2010中開發移動應用程序。您能否就如何在提交下面的代碼段中驗證文本框提供建議?我只需要檢查它是否包含一個值。理想情況下,我想在這個div下面放置一條錯誤消息。JQuery移動驗證
<div data-theme="a" class="ui-grid-a">
<div class="ui-block-a">@Html.TextBox("id", "", new { @class = "mystyleclass", onclick = "this.value=''" })</div>
<div class="ui-block-b">
<button type="submit" data-theme="b">Search</button>
</div>
</div>
嗨,文本框沒有連接到模型。如果需要,我可以這樣做,但我是從控制器操作的窗體中獲取文本框中的值。 – user1698316