Radiobutton不在mvc工作 [英] Radiobutton not working in mvc

查看:81
本文介绍了Radiobutton不在mvc工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i我正在使用radiobutton,但它不能在模糊中工作....





i am using the radiobutton but it not working in the blur....

 <div id="sports" class="weather col-lg-12 col-md-12 col-sm-12 col-xs-12" style="width:100%;">
                                    <form method="post" action="/SportsDept/Create"  name="second" id="second">
<span class="status"></span>
@foreach (var t in sptname)
    {
     <br />
     <span class="status" ></span>
     <input name="Players[0].Level" id="Players_0__Level" type="radio" checked="checked" value="BEG"><label for="Players_0__Level">@t</label>
    }
      </div>




<script>
    $("#Players_0__Level").on("click", function () {
        location.href = '/SportsDept/Create/' + $(this).find('Players[0].Level').text();
    });
</script>





有时候foreach sptname名称有两个以上的值...



i想要在点击单选按钮时重定向页面......



这里只有作品第一个radiobutton第二个和第三个不工作..



我想将radiobutton名称传递给下一页..



在mvc5 ..



i不知道这个细节足以给出正确的解决方案!





问候

AR



some time the foreach sptname name have more than two values...

i want to redirect the page on clicking the radiobutton...

here works only the first radiobutton second and third are not working..

and i want to pass the radiobutton name to the nextpage..

in mvc5..

i don't know this details enough for give a correct solution !!!


Regards
AR

推荐答案

#Players_0__Level)。on( 点击 function (){
location .href = ' / SportsDept / Create /' +
("#Players_0__Level").on("click", function () { location.href = '/SportsDept/Create/' +


this )。find(' 玩家[0] .Level')。text();
});
< / script >
(this).find('Players[0].Level').text(); }); </script>





有时候foreach sptname名称有两个以上的值...



i想要在点击单选按钮时重定向页面......



这里只有作品第一个radiobutton第二个和第三个不工作..



我想将radiobutton名称传递给下一页..



在mvc5 ..



i不知道这个细节足以给出正确的解决方案!





问候

AR



some time the foreach sptname name have more than two values...

i want to redirect the page on clicking the radiobutton...

here works only the first radiobutton second and third are not working..

and i want to pass the radiobutton name to the nextpage..

in mvc5..

i don't know this details enough for give a correct solution !!!


Regards
AR


尝试:



Try:

<script>


这篇关于Radiobutton不在mvc工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆