我想在选择更改事件时加载一个页面。但它不是显示页面。页面上的内容只是:这是银行/这是现金。
<!DOCTYPE html>
<html>
<select id = "ddl" onchange="changeSheet()">
<option value = "bank">Bank Statement</option>
<option value = "cash">Cash Book</option>
</select>
<div id = "sheet">
</div>
<script>
function changeSheet()
{
document.getElementById('sheet').innerHTML = "";
var e = document.getElementById("ddl");
var strUser = e.options[e.selectedIndex].value;
if(strUser == 'bank')
{
$("#sheet").load("bank.php");
}
else
{
$("#sheet").load("cash.php");
}
}
</script>