I want to change my js document in HTML. the HTML code like this:
<div id="content_FoodSales_bar" class="p_chart>
<script id="box1" type="text/javascript" src="../scripts/FoodSales_bar_mysql.js"></script>;
</div>
and I want to change the src attribute in script. the javascript document to achieve that like this:
$('#box1').attr("src",'../scripts/FoodSales_bar2_mysql.js');
and this:
document.getElementById('box1').src='../scripts/FoodSales_bar2_mysql.js';
but both of them cannot work. how can I do?