Home > Web Front-end > JS Tutorial > js method implementation code that returns multiple data_javascript skills

js method implementation code that returns multiple data_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:53:35
Original
1153 people have browsed it
Copy code The code is as follows:

//Return multiple data methods
function getPos(){
var xx = "xx";
alter(xx);
var yy = "yy";
return{x:xx,y:yy};
}
/ /Call
function getXY(){
var ret = getPos();
alert(ret.x);
alert(ret.y);
}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template