日期:2014-05-16 浏览次数:20536 次
function __toString(){
$form='<form action="'.$this->action.'" method="post" >';
switch($this->shape){
case "rect":
$form.=$this->getRect();
break;
case "triangle":
$form.=$this->getTriangle();
break;
case "circle":
$form.=$this->getCircle();
break;
default:
$form.='请选择一个形状<br>';
}
$form.='<input type="submit" name="sub" value="计算">';
$form.='</form>';
return $form;
}