最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - how to solve "NetworkError: 404 Not Found - http:localhost:50765Scriptsjquery-1.5.1.min.js" error

programmeradmin4浏览0评论

i am trying to add date picker to my textbox. i have added all needed java scripts and referenced it properly but it is giving me following error.

"NetworkError: 404 Not Found - http:/Scripts/jquery-1.5.1.min.js"

i am trying to add date picker to my textbox. i have added all needed java scripts and referenced it properly but it is giving me following error.

"NetworkError: 404 Not Found - http:/Scripts/jquery-1.5.1.min.js"

Share Improve this question asked Dec 18, 2014 at 6:40 Nikhil SaswadeNikhil Saswade 1772 gold badges6 silver badges17 bronze badges 2
  • Please show your JS included code. – Sadikhasan Commented Dec 18, 2014 at 6:41
  • <script type="text/javascript" > $(document).ready(function () { $('.datepicker').datepicker(); }); function onSubmit() { var empId = document.getElementById('EmpId'); var deptid = document.getElementsById('DeptId'); if (empId.value.trim() == 0 || isNaN(parseInt(empId.value))) { empId.value = '0'; } } </script> – Nikhil Saswade Commented Dec 18, 2014 at 9:04
Add a ment  | 

3 Answers 3

Reset to default 2

This problem will occur if jquery-1.5.1 is missing from script folder. Check the path for file jquery-1.5.1.min.js. If it's a webapp you are running, it would be placed inside <webapp-root>/Scripts. Also, as per the error it seems that you have e one extra directory back while setting the path for this file.

NuGet package to be installed using mand - Install-Package jQuery -Version 1.5.1 as specified on this link.

Use this to include jQuery:

<script src="/Scripts/jquery-1.5.1.min.js"></script>

Add this line before <html> tag

<%@ taglib uri="http://java.sun./jsp/jstl/core" prefix="c"%>

Then, put this code in your HTML <head></head>

<script src='<c:url value="/Scripts/jquery-1.5.1.min.js"/>'></script>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论