文章列表
1.看到网上这方面的资料比较少的。自己写点东西出来看看对将来有所整理帮助!
示例一:
前端<div>
服务端:返回的是文本或是一段HTML代码
JS代码还是原来的一样:
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
xmlHtt ...
function checkUser(){
var username=document.all("username").value;
if(username==""||username.length<6){
var text="用户名最低为六位";
var result=document.getElementById("result");
result.innerHTML="<font color=\"red\">"+text+" ...
<SCRIPT type=text/javascript>
var xmlhttp;
function send(){
if(window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
if(xmlhttp.overrideMimeType){
xmlhttp.overrideMimeType("text/xml");
}else if(window.ActiveXObject){
var activexName = ["MSXML2.XMLHTTP",&quo ...
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def __unicode__(self):
return self.name
class Author(models.Model):
name = models.CharField(max_length=50)
email = models.EmailFi ...