0
나는 index.html
에 있으며, 나는 ajax query.php
을 얻었습니다. 이제 block.html
을 content
에로드하기 전에 색상/크기 정보없이 텍스트가 나타나지 않게하려면 어떻게해야합니까?로드 된 내용을 표시하기 전에 채우는 방법?
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