加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc-4 – Captcha MVC 4刷新按钮未显示

发布时间:2020-12-16 06:50:01 所属栏目:asp.Net 来源:网络整理
导读:我正在使用Captcha Mvc 4.0(Vyacheslav) 这是我的代码: @Html.Captcha("Refresh","Enter the text shown in imag",5,"Is required field.",false) 这是问题所在: 它运行平稳但刷新按钮没有显示,这是由于style =“display:none;” a href="#CaptchaImage"
我正在使用Captcha Mvc 4.0(Vyacheslav)

这是我的代码:

@Html.Captcha("Refresh","Enter the text shown in imag",5,"Is required field.",false)

这是问题所在:

它运行平稳但刷新按钮没有显示,这是由于style =“display:none;”

<a href="#CaptchaImage" id="5f88fe4e11e743c6a8a8430de57cfcff"  
  onclick="______f9192ce4675540129ec6f99adc316d82________()"   
  style="display:none;">Refresh</a>

如何让它可见?

解决方法

在代码中,他执行.show(),只有在加载jquery时才有效.要解决此问题,请在调用方法之前导入jquery,或者执行以下操作以分离标记和脚本.

@{
    var captcha = @Html.Captcha("Refresh",false)
}

@captcha.RenderMarkup()

@section scripts
{
    @captcha.RenderScript()
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读