gpt4 book ai didi

jquery - 实时验证用户输入

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:30:00 26 4
gpt4 key购买 nike

我基本上想要一个标题字段和一个 URL 标题字段。

基本上,用户输入电影名称:“From Paris With Love”,它会在下面的字段中显示为“from-paris-with-love”。

不过,我想知道是否已经有类似的东西,而且我知道这里有人会知道! ;)

  • 亚伦

编辑:

http://www.thewebsitetailor.com/jquery-slug-plugin/太完美了!

最佳答案

您可以使用 JavaScript 函数 encodeURIComponent,它将替换空格和任何其他不能在 URL 中使用的字符。

引用: https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Global_Functions:encodeURIComponent

关于jquery - 实时验证用户输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2297902/

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