click_function_ps()
一旦函数执行,我编写了代码来刷新 DIV 容器。但是我的代码不起作用。它说:
missing ; before statement
var newHTML = "<img class="displayed" src="ganttchart.php">";
那么,我需要放在;
哪里?
<div class="buttons">
<a href="#" class="regular" onclick="click_function_ps(); replaceContent();">
<img src="images/opt.png" alt=""/> Run </a>
</div>
<div id="opt_container">
<table width="100%">
<tr>
<td width="100%">
<div class="scrollbar" id="chart">
<img class="displayed" src="ganttchart.php">
</div>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
function replaceContent() {
var newHTML = "<img class="displayed" src="ganttchart.php">";
document.getElementById("scrollbar").innerHTML = newHTML;
}
</script>