Home  >  Article  >  Web Front-end  >  Getting Started with Dojo Study Notes First Dojo Example_dojo

Getting Started with Dojo Study Notes First Dojo Example_dojo

WBOY
WBOYOriginal
2016-05-16 18:41:41837browse

Step 1: Configurate Dojo
Download the latest Dojo package from http://www.dojotoolkit.org/downloads and put it somewhere in your project. For example, I put my dojo library in the lib folder (as shown in Figure 1).

Figure 1 (File Directory Structure)
Add the following code to your page, then the most basic configuration is completed.

Step 2: Start your First Example
My first example is to simulate a simple login page. If successful, it will display "Right!", otherwise it will display "Wrong! Please try it again!"

Copy code The code is as follows:





Untitled Document




















(For the Dojo methods, you can check the Dojo API, which will not be described here)
The background uses php, the code is as follows:
Copy code The code is as follows:

if($_POST["name"] == " blithe" && $_POST["password"]=="blithe"){
print "right";
}else{
print "wrong";
}
?>
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