社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Jquery

jquery未在html表单中定义[已关闭]

Kevin Test • 5 年前 • 1487 次点击  

我一直有这个错误。为了解决这个问题,我尝试在编写脚本之前加载jquery库,当然也尝试了其他方法。

我的HTML当前如下所示:

  <html>
    <head>
    </head>
    <body>
    <div id="pageContent" data-step='init' class="ui-widget">
        <div class="form-group">
        <label for="search">Handelsnaam</label>
        <input id="search" type="text" autocomplete="off" name="query" placeholder="Zoek op handelsnaam" class="form-control">
        <small id="searchHelp" class="form-text text-muted">Vul uw handelsnaam in...</small>
        </div>

        <div class="form-group">
        <label for="handelsnaam">Handelsnaam</label>
        <input type="text" class="form-control" id="handelsnaam" name="handelsnaam" placeholder="Handelsnaam">
        <label for="straat">Straat</label>
        <input type="text" class="form-control" id="straat" placeholder="Straat">
        <label for="huisnummer">Huisnummer</label>
        <input type="text" class="form-control" id="huisnummer" placeholder="Huisnummer">
        <label for="huisnummertoevoeging">Huisnummertoevoeging</label>
        <input type="text" class="form-control" id="huisnummertoevoeging" placeholder="Huisnummertoevoeging">
        <label for="postcode">Postcode</label>
        <input type="text" class="form-control" id="postcode" placeholder="Postcode">
        <label for="plaats">Plaats</label>
        <input type="text" class="form-control" id="plaats" placeholder="Plaats">
        <label for="achternaam">Achternaam</label>
        <input type="text" class="form-control" id="achternaam" placeholder="Achternaam">
        <label for="opmerking">Opmerking</label>
        <input type="text" class="form-control" id="opmerking" placeholder="Opmerking">

        <input id="btntest" type="button" value="Submit" onclick="window.location.href = 'https://jewebsite.com/bedank-pagina?companyName=' + encodeURIComponent(document.getElementById('handelsnaam').value) + '&CPLastname=' + encodeURIComponent(document.getElementById('achternaam').value) + '&EXTRAOPMERKING=' + encodeURIComponent(document.getElementById('opmerking').value)" />
        </div>

    </div>
    <script src="https://code.jquery.com/ui/1.10.2/jquery-ui.js" ></script>
    <script src="js/script.js"></script>
    </body>
    </html>

我的script.js文件的开头如下:

jQuery(document).ready(function($) {

我得到的确切错误是:

jquery-ui.min.js:17 Uncaught ReferenceError: jQuery is not defined
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/39889
 
1487 次点击  
文章 [ 1 ]  |  最新文章 5 年前