Javascript-new users: front-end Interaction

Source: Internet
Author: User
At the front end of the entry line, the page can be written, but it will be dizzy when it comes to collaboration with the backend. Recently, there is a need to determine whether a person has received a prize or not, my colleague told me that this is what he did. He gave me a variable and asked me to judge this variable? My colleague is a php engineer... What is it... at the front end of the entry line, the page can be written, but it will be dizzy when it comes to collaboration with the backend. Recently, there is a need to determine whether a person has received a prize or not, my colleague told me that this is what he did. He gave me a variable and asked me to judge this variable? My colleague is a php engineer... What is a variable for me? How can I receive it? My colleagues didn't mention That ajax was used to send requests.

Reply content:

At the front end of the entry line, the page can be written, but it will be dizzy when it comes to collaboration with the backend. Recently, there is a need to determine whether a person has received a prize or not, my colleague told me that this is what he did. He gave me a variable and asked me to judge this variable? My colleague is a php engineer... What is a variable for me? How can I receive it? My colleagues didn't mention That ajax was used to send requests.

Making a variable is similar
Script var hasUsed = ; Script

You have obtained this variable.hasUsedMake a judgment.

You can reserve a location for his variable in your code, for example:

《script》var countTime = 
  ;《script》

The The variable that your colleague calls will become

《script》var countTime = 5;《script》

You can do this during development.

《script》var countTime = 5;//
  ;《script》

In this way, you can test your code Logic first. If everything is okay, it will be done by restoring it to Example 1. It's easy.

I will try it out. I will try it for you.

The question you asked is too easy to get started. I don't want to ask my colleagues modestly.

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.