How to use js variables

Source: Internet
Author: User
How can I use a php page to upload js variables to an array of html pages? $ Itemnamejs how can I accept it? I used it directly. it seems that I am not going to ask for help from new users. I used html pages & lt ;? Var_dump ($ Itemname )? & Gt; value available !, To avoid misleading the Author, JSON. parse is used to parse json strings in JS ., How to use js variables
How can I accept an array $ Itemname js uploaded from a php page to an html page? I used it directly. it seems that I am not a newbie for help.
Html page Value available!

------ Solution --------------------
JSON. parse is used to parse json strings in JS.
------ Solution --------------------
Everyone said it was gbk.
PHP code
Function recursive_urlencode (& $ val) {if (is_array ($ val) foreach ($ val as & $ v) Recursive ($ v ); else $ val = urlencode ($ val);} echo urldecode (json_encode (recursive_urlencode ($ your array )));

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.