请问怎么把数据显示到label上呢?

怎么把rst的值 显示在 this.label.string上呢?

onLoad: function () {

	this.label.string = "";
	
	var xhr = new XMLHttpRequest;
	xhr.open('post', 'http://localhost/aa.php',true);
	xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xhr.send();
	xhr.onreadystatechange = function() {
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status ==304)) { //响应完成并且响应码为200或304
			var rst = JSON.parse(xhr.responseText);				
			console.log(rst);   
			//console.log(rst.name);     
			
			}
			
	}
	
},

不记得是不是这样写了…

	this.label.string = "";
        let myLabel = this.label;

	var xhr = new XMLHttpRequest;
	xhr.open('post', 'http://localhost/aa.php',true);
	xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xhr.send();
	xhr.onreadystatechange = function() {
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status ==304)) { //响应完成并且响应码为200或304
			var rst = JSON.parse(xhr.responseText);				
			console.log(rst);   
			//console.log(rst.name);     
                        myLabel.string = rst.name;
			}

	}

作用域问题,绑定this,或者用匿名函数