一起学习
前面有人发布过关于Aptana出的jaxer的信息。jaxer号称世界第一个真正的
ajax服务器.现在又有人开发了一个Pyxer,是一个基于
python的ajax服务器
主页:
讨论:
下载:
- "">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Proxy Demotitle>
- head>
- <body>
-
- <form action="" onSubmit="save_data(document.getElementById('num').value); return false;">
- Value between 5 an 50
- <input type="text" value="" id="num" onChange="validate(this.value)">
- form>
-
- <script language="Python" type="text/python" runat="both">
- def validate(value):
- value = int(value)
- if not (5 <= value <= 50):
- alert("Number not in range!")
- return False
- return True
- script>
-
- <script language="Python" type="text/python" runat="server-proxy">
- def save_data(value):
- file("counter.txt", "w").write(value)
-
- def load_data():
- return file("counter.txt", "r").read()
- script>
-
- <script language="Python" type="text/python" runat="client">
- def onload():
- document.getElementById('num').value = load_data()
-
- window.onload = onload
- script>
-
- body>
- html>
TAG:
Ajax
AJAX
ajax
Python
下载本文示例代码
Python AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX ServerPython AJAX Server
阅读(577) | 评论(0) | 转发(0) |