jQuery css() 方法动态修改CSS属性
441
2024-02-17
class People
{
private $name;
public function GetName()
{
return $this->name;
}
public function SetName($name)
{
$this->name=$name;
}
}
class Student extends People
{
private $grade;
public function SayHello()
{
echo("Good Morning,".parent::GetName());
}
}
class Student extends People
{
public function GetName()
{
return "kym";
}
private $grade;
public function SayHello()
{
echo("Good Morning,".self::GetName());
//echo("Good Morning,".$this->GetName());
}
}
<?php
abstract class People
{
private $name;
public function GetName()
{
return $this->name;
}
public function SetName($name)
{
$this->name=$name;
}
abstract function SayHello();
}
class Student extends People
{
public function SayHello()
{
echo("Good Morning,".parent::GetName());
}
}
$s=new Student();
$s->SetName("kym");
$s->SayHello();
?>
<?php
abstract class People
{
private $name;
public function GetName()
{
return $this->name;
}
public function SetName($name)
{
$this->name=$name;
}
abstract function SayHello();
}
interface IRun
{
function Run();
}
class Student extends People implements IRun
{
public function SayHello()
{
echo("Good Morning,".parent::GetName());
}
public function Run()
{
echo("两条腿跑");
}
}
$s=new Student();
$s->SetName("kym");
$s->SayHello();
$s->Run();
?>
<?php
class Person
{
private $name;
private $age;
public function Person($name,$age)
{
$this->name=$name;
$this->age=$age;
}
public function SayHello()
{
echo("Hello,My name is ".$this->name.".I'm ".$this->age);
}
}
$p=new Person("kym",22);
$p->SayHello();
?>
<?php
class Person
{
private $name;
private $age;
public function Person($name,$age)
{
$this->name=$name;
$this->age=$age;
}
public function SayHello()
{
echo("Hello,My name is ".$this->name.".I'm ".$this->age);
}
}
class Student extends Person
{
private $score;
public function Student($name,$age,$score)
{
$this->Person($name,$age);
$this->score=$score;
}
public function Introduce()
{
parent::SayHello();
echo(".In this exam,I got ".$this->score);
}
}
$s=new Student("kym",22,120);
$s->Introduce();
?>
class Student extends Person
{
private $score;
public function Student($name,$age,$score)
{
$this->Person($name,$age);
$this->score=$score;
}
public function Introduce()
{
parent::SayHello();
echo(".In this exam,I got ".$this->score);
}
function __destruct()
{
echo("我要被卸载了");
}
}
#免责声明#
本站[绿夏技术导航]提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该程序或内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件[admin@lxwl520.com]与我们联系进行删除处理。敬请谅解!