在页面使用python做脚本语言
工作原理是在装有 silverlight 或者 moonlight 的浏览器,页面如果加载了 Gestalt 提供的 gestalt.js,就可以使用 IronPython 或 IronRuby 代替 JavaScript 工作了。例如:<body>
<button id="say_hello">Say, Hello!</button>
<script language="python">
def OnClick(s,e):
document.say_hello.innerHTML = "Hello, World!"
document.say_hello.AttachEvent("onclick", EventHandler(OnClick))
</script>
</body>
gestalt.js在附件中
页:
[1]