//用flask搭建一个简单的服务器环境
from flask import Flask,render_template
app = Flask(__name__)
@app.route('/index')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
//在百度爬一下输入框的联想数据,显示在本地
<!DOCTYPE html>
<html lang="ZH-cn">
<head>
<meta charset="UTF-8">
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
<title>首页</title>
<script type="text/javascript" src="static/js/jquery1.12.4.min.js"></script>
<script type="text/javascript">
$(function () {
$('#xx').bind('input propertychange',function(){
$('.ul0').html('');
var $val = $(this).val();
if($val == ''){