JS构造函数
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function LayerPoperty(cloudType,version,lineId,modelChunk) {
this.cloudType=cloudType;
this.version=version;
this.lineId=lineId;
this.modelChunk=modelChunk;
}
LayerPoperty.prototype.getVersion=function () {
return this.version;
}
var p=new LayerPoperty("wire",2017,435,'1-200');
alert(p.getVersion());
</script>
</body>
</html>