当我运行 HTML 页面时,单击按钮后必须调用我的 PYTHON 程序。
<html>
<head>
<script type="text/javascript" language = "javascript">
function clicked()
{
// call python program
}
</script>
</head>
<body>
<input type="button" onclick = "clicked()" id="b1">
</body>
</html>
Python 程序:
print("Hii")
最佳答案
您可能想要向 Python 实现的端点发送请求。
关于javascript - 如何将 HTML 与 Python 结合起来?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61511192/