<html>
<head>
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$.getScript("demo_ajax_script.js");
});
});
</script>
</head>
<body>
<button>Use Ajax to get and then run a JavaScript</button>
</body>
</html>