我编写了一段代码,想要在执行函数Click_Functionps()时刷新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>