0
我在index.html
,我ajax query.php
并得到结果。现在如何在将block.html
加载到content
之前填充block.html
,以便在没有颜色/大小信息的情况下不会显示文本?如何在显示之前填充加载的内容?
的index.html
<div id="content"><button id="button1" type="button">click</button></div>
block.html
You selected the color: <div id="color"></div>!
You chose a size of: <div id="size"></div>!
query.php
$result = array('color' => 'blue', 'size' => '12');
echo json_encode($result);
为什么block.html自己的文件? –
有多个步骤,当你点击一个按钮,它会加载block.html到内容中,当你点击另一个它会加载block2.html。 – Roger