小编Luc*_*žek的帖子

未捕获的ReferenceError:$未定义(PHP中的JavaScript/HTML)

我在我的网站上的这个脚本导致了一些意外错误:Uncaught ReferenceError: $ is not defined 它应该重写enter的功能,作为站点表单输入中的选项卡,而不是提交该表单.

<script type="text/javascript">
 $('input').keypress(function(e) {
  if (e.which == 13) {
    <--! says error is here within the $ symbol -->
    $(this).next('input').focus();
    e.preventDefault();
  }
 });
</script>
Run Code Online (Sandbox Code Playgroud)

html javascript php forms

-3
推荐指数
1
解决办法
2万
查看次数

标签 统计

forms ×1

html ×1

javascript ×1

php ×1