我就想,这样的功能应该有现成的吧,

果不其然,一下就找到了,站在巨人的肩膀上果然很快:)

https://github.com/ichord/At.js

 

1 <link href="css/jquery.atwho.css" rel="stylesheet">
2 <script src="http://code.jquery.com/jquery.js"></script>
3 <script src="js/jquery.caret.js"></script>
4 <script src="js/jquery.atwho.js"></script>
5 
6 $('#inputor').atwho({
7     at: "@",
8     data:['Peter', 'Tom', 'Anne']
9 })

代码通俗易懂,简介明快

相关文章:

  • 2020-10-26
  • 2022-02-22
  • 2021-10-06
  • 2021-10-18
  • 2022-12-23
  • 2019-05-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案