function f1(id)
{
$('#summary').html(' <script type ="text/javascript" src="apps.js">
</script>');
}
&#13;
{{1}}
答案 0 :(得分:0)
试试这个:
<div id="summary">
<script src="user.js"></script>
</div>
<button type="button" onclick="app(1);">
Personal
</button>
<a href="#" onclick="app();">
Apps
</a>
<button type="button" >
Settings
</button>
<script>
function app(number)
{
if (number == null) {
$('#summary').html("<script src='app.js' />")
}
if (number != null) {
$('#summary').html("<script src='user.js' />")
}
}
</script>