gpt4 book ai didi

javascript - 快乐的验证问题

转载 作者:行者123 更新时间:2023-12-03 12:24:13 25 4
gpt4 key购买 nike

我正在使用 HappyJS 进行表单验证,但似乎无法使其工作。

我有一些 CoffeeScript ,例如:

jQuery ->
$(document).ready ->
$("#new_store").isHappy fields:
"#store_name":
required: true
message: "There really needs to be a name here"

和一些像这样的html:

<form id='new_store'>
<input id="store_name" type="text" />
</form>

这是一个JSFiddle

最佳答案

尝试this updated fiddle ,它对我有用。

$("#new_store").isHappy fields:
"#store_name":
required: true
message: "There really needs to be a name here"

你的 fiddle 的问题似乎是你正在使用原始的 GitHub URL 来热链接 HappyJS 文件。使用RawGit反而。另外,see this answer .

关于javascript - 快乐的验证问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24296164/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com