Dynamically generate JavaScript code in php_PHP tutorial

WBOY
Release: 2016-07-21 15:47:15
Original
1045 people have browsed it

Copy code The code is as follows:

echo <<
JS;
?>




Please Click

< ;/html>

Copy code The code is as follows:

$ confirm = "Are you OK with this?"; //Define the message on the confirmation box
$ok_msg = "I'm OK!"; //The message when OK
$not_ok_msg = "I'm not OK!"; //Cancel information

echo ""; //End of output
?>

< ;head>


Please Click


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319951.htmlTechArticleCopy the code as follows: ?php echo JS //Use multi-line output method to output JavaScript code SCRIPT Language = " JavaScript" function func() { if(confirm("Are you OK with this?")) {...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!