Invalid interface after JS reference

Source: Internet
Author: User

Contact with a new system, according to the needs of users, coupled with the video scroll bar to achieve the effect of scrolling, after looking for some data, through a simple comparison, the last choice to use Easyui slider scroll bar to achieve this function, the Easyui demo download down, Copy the Domo Web page to the project, and the introduction of the corresponding CSS and JS, all ready to run the page, found that the scroll bar in the page does not have the scroll block, and the ability to upload the video is also invalid, I did not change any other features of the code, but the problem arises, what is the reason? Struggling to find a solution to the problem, a simple backup, using SVN to restore the original version, run again, the functionality can be achieved.

Next step to test, first put JS into the introduction, do not write Easyui control div,<input id = "Slider" class= "Easyui-slider"/>, and found that the page upload function is still not implemented, I would like to The problem must be in the JS and CSS reference, is JS conflict? Or is there a conflict in CSS? After checking again, it seems that there is no conflict.

<link href= "${ctx}/js/uploadify3.1/uploadify.css" rel= "stylesheet" type= "Text/css"/><script src= "${ctx}/ Js/uploadify3.1/jquery.uploadify.min.js "type=" Text/javascript "></script><script type=" text/ JavaScript "src=" ${ctx}/js/jcrop/jquery. Jcrop.js "></script><!--scrollbars start--><link rel=" stylesheet "type=" Text/css "href=" ${ctx}/themes/ Default/easyui.css "/><link rel=" stylesheet "type=" Text/css "href=" ${ctx}/themes/icon.css "/><link rel=" Stylesheet "type=" Text/css "href=" ${ctx}/js/roller/demo.css "/><script type=" Text/javascript "src=" ${ctx}/js/ Roller/jquery.easyui.min.js "></script><!--scroll bar End--

        The final question is the team leader, the original problem is the JS conflict, but I forgot that the page itself refers to other pages, and other pages quoted JS and this page JS there is a conflict.

JS Reference and this reference JS code are all written in the page is the same, when the system can not find the JS file, it is not possible to implement button triggering and other functions, and the reason that the system cannot find the JS file, one is because this JS does not exist, the second is because the system found two parts of the same JS, I don't know which one it is. This is equivalent to the page has two exactly the same method, when writing Java code, the method is the same as the system must be wrong, and JS is the script language only run time will be error, so we can not see in the reference error, can only be based on the phenomenon of error analysis.

How to avoid this problem next time, the next time when quoting JS must pay attention to see if there is a conflict, this page refers to the other pages whether there is a conflict, through this problem to think about change. A June said the right, a word, do not give yourself the wrong reasons for the present, to give their own future mistakes to find solutions.






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.