对于看见 JS 代码就很痛苦的我来说,Brython 就像是福音,希望它发展顺利!
<html>
<head>
<script src="brython.js"></script>
</head>
<body onLoad="brython()">
<script type="text/python">
from browser import document, alert
import math
alert( "Hello World" )
def func( ev ):
alert( document["in"].value )
document["click"].bind( "click", func )
</script>
<input id="in"><button id="click">click</button>
</body>
</html>