如何传递值 - 查看控制器? [英] How to pass values - view to controller ?
本文介绍了如何传递值 - 查看控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i想要传递值,查看控制器...
my代码
< 输入 name = 玩家[0]。级别 id = Players_0__Level type = radio 已选中 = 已选中 value = @t > < 标签 = Players_0__Level > @t < / label >
脚本
< script < span class =code-keyword>>
$( document )。ready( function (){
$( #Players_0__Level)。on( 点击, function (){
location .href = ' / SportsDept / Create /' + $( this )。find(' # Players_0__Level'跨度>)VAL();
});
});
< / script >
i使用find('#Players_0__Level')。val();但是这个鳕鱼没有工作......
请为我的问题解决..
问候
-AR
解决方案
( document )。ready( function (){
( #Players_0__Level)。on( 点击, function (){
location .href = ' / SportsDept / Create /' +
( this )。find(' #Players_0__Level')。val();
});
});
< / script >
i使用find('#Players_0__Level')。val();但是这个鳕鱼没有工作......
请为我的问题解决..
问候
-AR
hi,
i want to pass the values , view to controller ...
my code
<input name="Players[0].Level" id="Players_0__Level" type="radio" checked="checked" value="@t"><label for="Players_0__Level">@t</label>
script
<script>
$(document).ready(function () {
$("#Players_0__Level").on("click", function () {
location.href = '/SportsDept/Create/' + $(this).find('#Players_0__Level').val();
});
});
</script>
i am using "find('#Players_0__Level').val();" but this cod nnot working...
please give a solution for my problem..
Regards
-AR
解决方案
(document).ready(function () {
("#Players_0__Level").on("click", function () { location.href = '/SportsDept/Create/' +
(this).find('#Players_0__Level').val(); }); }); </script>
i am using "find('#Players_0__Level').val();" but this cod nnot working...
please give a solution for my problem..
Regards
-AR
这篇关于如何传递值 - 查看控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文