如何在mvc razor中为Product下拉列表编写jquery验证 [英] how to write jquery validation for Product dropdownlist in mvc razor
本文介绍了如何在mvc razor中为Product下拉列表编写jquery验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Razor中为DropDownList编写JQuery脚本,当选择键盘时,值必须在数量文本框中显示
@ Html.LabelFor(a => a.ProductName) |
I want to write JQuery script in Razor for DropDownList ,When Keyboard is selected a value has to display in quantity text box
|
推荐答案
检查以下小提琴。
小提琴 [ ^ ]
点击提交时,如果没有选择,则表示该字段是必需的。我在这里使用了jquery验证器。
希望这会有所帮助。
谢谢
Check the below fiddle.
Fiddle[^]
On click of submit it says the field is required if none is selected. I have used jquery validator here.
Hope this helps.
Thanks
这篇关于如何在mvc razor中为Product下拉列表编写jquery验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文