s1 服务器返回xml
在后台php文件中写header
header('content-type:text/xml;charset=utf-8');
2 服务器返回json
在后台php文件中写header
header('content-type:text/json;charset=utf-8');
3
创建对象
ulDom = documenr.createElement('ul');
添加到body上
document.body.appendChild(ulDom);
创建li对象
liDom = document.createElement('li');
添加到ul上
ulDom.appendChild(liDom);
4
<input type="text">
<input type="button" value="查询">
<input type="button" value="查询" class="lastBtn">
获得元素
document.querySelector('input[type=button]')
document.querySelector('input[type=text]')
document.querySelector('.lastBtn')
5