<?php
//以下为加载时的查询语句
$sql="select * from t_d_message";
$stmt=$pdo->query($sql);
$rows=$stmt->fetchAll();
$json_message=json_encode($rows);
?>
var myMessages = ['info', 'warning', 'error', 'success']; // define the messages types
var MessageJson = JSON.parse('<?php echo $json_message;?>');
var MessageArray = [];
for (var i = 0; i < MessageJson.length; i++) {
MessageArray.push(MessageJson.content);
}
欢迎光临 重工电子论坛 (http://cqutlab.cn/) | Powered by Discuz! X3.1 |