两个文件:

    1. // index.html
    2. <script src="/index.js"></script>
    3. <body>it works?<body>
    1. // index.js
    2. alert('it is cool');

    一键启动:

    1. python -m SimpleHTTPServer 8000

    查看效果:
    http://127.0.0.1:8000
    Python 一键开启 http server - 图1