Php problems (urgent)

Source: Internet
Author: User
Php problems (urgent) 1. use JAVASCRIPT to write a floating point formatting function. You must specify the number of decimal places to retain. Requirement: the IE version is earlier than 5.5, that is, new functions are unavailable. 2. use PHP to write a function to format and display the file size. It is displayed as 345b, 123 K, 78 M, 1. php problems (urgent)
1. use JAVASCRIPT to write a floating point number formatting function. You must specify the number of decimal places to retain. Requirement: the IE version is earlier than 5.5, that is, new functions are unavailable.
2. use PHP to write a function to format and display the file size. It is displayed as 345b, 123 K, 78 M, 1.2G. that is to say, if the value exceeds 1 K, the unit is K. If the value exceeds 1 M, the unit is M.
3. use PHP to write a function that converts the color # 20345D on the webpage into r g B. You cannot use global variables. the function must return three RGB values at the same time. Note that #123 is included in HTML in FIREFOX format, which is short for #112233.


------ Solution --------------------
Why ??

Based on your 14.29% posting rate?
------ Solution --------------------
Reference the post of nanhuaboy:
1. use JAVASCRIPT to write a floating point number formatting function. You must specify the number of decimal places to retain. Requirement: the IE version is earlier than 5.5, that is, new functions are unavailable.
2. use PHP to write a function to format and display the file size. It is displayed as 345b, 123 K, 78 M, 1.2G. that is to say, if the value exceeds 1 K, the unit is K. If the value exceeds 1 M, the unit is M.
3. use PHP to write a function that converts the color # 20345D on the webpage into r g B. You cannot use global variables. the function must return three RGB values at the same time. Note that HT in FIREFOX format...

------ Solution --------------------
The second question ...... It seems that I answered the question yesterday .....

------ Solution --------------------
Discussion
Why ??

Based on your 14.29% posting rate?

------ Solution --------------------
Haha
------ Solution --------------------
Dizzy

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.