How to embed javascript-php into HTML Script labels

Source: Internet
Author: User
Embed php into the script tag. If there are no rows available, the parsing will fail. What are the solutions? Ndocument. getElementById (& #039; content & #039;). innerHTMLmarked (& quot; & amp; lt ;? Php $ data? & Amp; gt; & quot;); embed php into the script tag. If there are no rows available, the parsing will fail. What are the solutions?
\ N document. getElementById ('content'). innerHTML = marked (" ");

Reply content:

Embed php into the script tag. If there are no rows available, the parsing will fail. What are the solutions?
\ N document. getElementById ('content'). innerHTML = marked (" ");

It seems that the two upstairs @ b9132 @ kevins1022 did not understand the problem of the landlord.

The main problem is$dataThere are many rows in the variable, that is, there is a line break, and if the output is directly, there will be a line break in the JS Code block,
Then a JS error is generated.
Similar to this:

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.