Mobile Page Development Summary _

Source: Internet
Author: User

1, picture pixels do not use specific px, to use% px

2, left and right margin also use%px

3, on the font, if too small px on the phone and on the computer there is a difference between the best case is with EM

4, for a GET request with parameters, do not leave a blank between the parameters, or read the data will not be taken value

(If the name is not wrong, the value also has a situation, then the view of your URL to see if there are strange characters after the parameter name)

5, in the face of multiple single-box values, first for them to take the same name value (so that it can only be selected, do not appear multiple selection), and give them to assign value value---loop radio box to determine their checked property, in the value

6, in the face of different mobile phone system may appear different width of the situation,

(

Actioninfo MyButton Style

var buttonwidth = $ (". Actioninfo"). Width () + 44;
$ (". MyButton"). Width (buttonwidth);

)

7, the prerequisite page gets the system current time compared to the time you defined

(new Date (). GetTime () < new date (Endtime). GetTime () converted to the same serial number)

8, the method of judging the distance end time

1    //EndTime defines the end time2 function D_time (endTime) {3             varobj = $ ("#lbl_Time");4             varEndtime =NewDate (endTime). GetTime ();5             varNowtime =NewDate (). GetTime ();6             varYoutime = Endtime-Nowtime;7             varseconds = youtime/ +;8             varminutes = Math.floor (seconds/ -);9             varHours = Math.floor (Minutes/ -);Ten             varDays = Math.floor (Hours/ -); One             varCday =Days ; A             varChour = hours% -; -             varCminute = minutes% -; -             varCsecond = Math.floor (seconds% -); the             if(Endtime <=nowtime) { -Obj.html ("has expired"); -  -}Else { +                 if(Days >0) { -Obj.append (""+ Days +"days"+ Chour +"when"+ Cminute +"points"+ Csecond +"seconds"); +                 } A                 Else if(Chour >0) { atObj.append (""+ Chour +"when"+ Cminute +"points"+ Csecond +"seconds"); -                 } -                 Else if(Cminute >0) { -Obj.append (""+ Cminute +"points"+ Csecond +"seconds"); -                 } -                 Else if(Csecond >0) { inObj.append (""+ Csecond +"seconds"); -                 } to             } +SetTimeout ("d_time ()", +); -}
View Code

Related Article

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.