//返回多个数据方法 function getPos(){ var xx = "xx"; alter(xx); var yy = "yy"; return{x:xx,y:yy}; } //调用 function getXY(){ var ret = getPos(); alert(ret.x); alert(ret.y); }
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