js能调用python里的函数吗?

这是python中的一个函数

def a():
    print('1')

下面是js:

<script type="text/javascript">
    function b(){
        调用python里的a()
    }</script>

 我想在js里调用python里面的a函数。

可以做到吗?


梵蒂冈之花
浏览 1244回答 1
1回答

ibeautiful

将python函数通过web api暴露出来,然后js通过ajax调用
打开App,查看更多内容
随时随地看视频慕课网APP