Home  >  Article  >  Web Front-end  >  Self-use js development framework Xiaocheng Friends who learn js can take a look_javascript skills

Self-use js development framework Xiaocheng Friends who learn js can take a look_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:16:211059browse

I would like to share this with you all. This is my first time posting in the blog garden. If there are any mistakes, please correct me.
Let me tell you how to use it first:

Directory structure

Usage steps
1. Introduce the frame js into the page.
2.
Copy code The code is as follows:

parcour.using('system. web.event');
window.onload = function () {
alert(eventUtil); // eventUtil is a class in event.js
}

is fine After seeing the effect, the only thing left is how to organize and expand your own development library.

-- Since the file content needs to be obtained synchronously, it needs to be deployed before testing. You can use vs to build a website, and then copy it to the project to run.

Personally summarized advantages:

1. Loose js codes can be organized according to functions or your own preferences for easy maintenance.
2. Only load the required js code to the page.

Disadvantages:
1. The referenced js code must be obtained synchronously. The number of requests is increased and performance and experience are reduced. (The severity has not been tested, and may be more suitable for LAN projects).

AttachedDownload
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn