Dwz framework --- (1) how to learn the dwz framework

Source: Internet
Author: User

As an open-source framework made in China, dwz is simple and practical. ------ This is an official saying. In fact, I personally think it is very difficult to use it .. Like other frameworks, You Don't Want To encapsulate many functions. Of course, you may feel simple and easy to use. In addition, if some different styles are displayed in the browser, the style will not be ugly... However, there is no way to learn the framework used in a recent project. There is not much nonsense. Let's talk about how to learn this framework.

The purpose of using the framework is convenient development. It encapsulates a large number of styles and JS methods, and you can directly call them without writing them yourself. However, you should have a good understanding of this function before using it. A feature of the dwz framework is that you cannot view the source code of the corresponding component on its home page. It is useless to view the source code, you must find the corresponding path and view it from the local source code. There is a demo in the source code, just look at it. Especially those JS files, you must make changes on the basis of the source code when you want to use them flexibly. Therefore, you must be familiar with these JS files and at least know where to use them. In this case, the source code is much better than the first half of the online query.

For example, in dwz. Ajax. JS

/*** Submit an Ajax form with File Upload * @ Param {object} form * @ Param {object} callback */function iframecallback (Form, callback) {var $ form = $ (form), $ IFRAME = $ ("# callbackframe"); If (! $ Form. valid () {return false;} if ($ IFRAME. size () = 0) {$ IFRAME = $ ("<IFRAME id = 'callbackframework' name = 'callbackframework' src = 'about: blank 'style = 'display: none '> </iframe> "). appendto ("body");} If (! Form. ajax) {$ form. append ('<input type = "hidden" name = "ajax" value = "1"/> 'specify parameter form.tar get = "callbackframe"; _ iframeresponse ($ IFRAME [0], callback | dwz. ajaxdone );}


For a js method like this, there are comments in the parameters used by the method. You can understand the functions at a glance, and you will know that this method is related to file upload, when a file upload problem occurs, you will first think about whether this method is called, instead of having no clue at all.

Sometimes it is necessary to write a function similar to the source code in a similar way.

In addition, the dwz framework is incompatible with browsers in many places. dwz is better compatible with IE, while other browsers may suffer from display disorder, for example, if the form style in the application framework is incompatible, try to write the style by yourself. The user experience is the first, don't let people wait for your website to get a new browser .....

 

 

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.