<script type='text/javascript'>
window.onload = get(5);
function get(n){
document.writeln('计算1!+2!+3!+...+'+n+'!的和:<br>');
var k=1;
for(var i=0;i<n;i++){
for(var j=1;j<i;j++){
k=j*k;
}
k+=k;
}
document.writeln(k);document.close();
}
</script>
转载于:https://www.cnblogs.com/legend-song/p/3567038.html