【问题标题】:jQuery tokeninput create new textbox automaticallyjQuery tokeninput 自动创建新的文本框
【发布时间】:2015-04-16 08:48:21
【问题描述】:

我在我的 Razor MVC5 视图中使用 jQuery tokeninput 插件,它在从数据库中搜索数据时工作正常,但我面临一个问题。

@Html.TextBoxFor(model => model.code, new { id = "diag", @class = "diag " })

tokeninput 附加到“diag”类

$(".diag").tokenInput("@Url.Action("Search", "approval")");

所以它对于所有具有类诊断的输入都可以正常工作。但是,如果您选择搜索的值,它会自动在下一行创建另一个 texbox。我搜索了很多解决方案。

有人遇到过这样的问题吗?请帮我解决这个问题。

提前致谢

【问题讨论】:

  • 你能放行动代码吗?还是样品?
  • 您好,问题已解决。我将它们添加为 facebook.css 并将令牌限制为 1 现在

标签: jquery asp.net-mvc razor jquery-tokeninput


【解决方案1】:

我认为这是 css 相关问题。您需要使用 tokeninput css。

<link href="your path/token-input.css" rel="Stylesheet" type="text/css" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-20
    • 1970-01-01
    • 1970-01-01
    • 2014-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多