我正致力于将数据发送到ajax。如何在php中退出javascript代码
$phpArray = array("ok", "
<script>
mygallery = [
{type: "image", image: "img/gallery/slider/1.jpg", thmb: "img/gallery/slider/thumbs/1.jpg", alt: "", title: "", description: "", titleColor: "#000000", descriptionColor: "#000000"},
{type: "image", image: "img/gallery/slider/2.jpg", thmb: "img/gallery/slider/thumbs/2.jpg", alt: "", title: "", description: "", titleColor: "#000000", descriptionColor: "#000000"},
</script>"
);
echo json_encode($phpArray);
如何正确执行此操作?我曾尝试在网上的javascript逃走,但doesn't工作
而且问题是 –
问题是我无法得到它的工作,因为我有(”“) – MANGA
刚刚在本地运行,并按照我的预期工作 –