Passing php values in html to JS solution

Source: Internet
Author: User
Pass the php value in html to JS & lt ;! -- & Nbsp; varmaxtime = 30*60 // one hour, in seconds! // Vart_time = & lt ;? Phpecho $ time ;? & Gt; // document. getElementById (& quot; time & quot;); the php value in html is passed to JS.

I still don't know how to understand your request. I have another post to detail my request ··
I want to use a nested php value $ time in html to transfer the red number to JS,
When JavaScript is called in html, the countdown time (implemented) is displayed. when the time ends, the form submission button is triggered.
The problem is how to pass the $ time value of php to js, because the countdown time varies depending on the exam type.


------ Solution --------------------
// Does that mean this?
HTML code
  

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.