In the design of some systems, often need to give users to operate the prompt. This hint is important, and friendly hints can improve the user's goodwill towards the system. Operation Tips There are a lot of designs, here is a humble plan for me, just a tip.
Action Tip class: Tips_class.php
Tips = "
$string return (auto return after 4 seconds)", return $this->tips; Public Function __tostring () { return $this->tips; } Private Function __clone () {}public static function get_tips ($string, $url) {if (FALSE = = (Self::$_instance instanceof Self ) {self::$_instance = new self ($string, $url);} return self::$_instance;} ? >
This class is simple enough to jump to a link after 4 seconds, or click to jump to that link.
__tostring () This function is very important, it can implement the string output of the class object.
How do you use this class?
Include_once ("./tips_class.php"); $hit = "Error: Two passwords entered are inconsistent"; $jump = ". /login.php "; Echo $tips = Tips::get_tips ($hit, $jump);
http://www.bkjia.com/PHPjc/752521.html www.bkjia.com true http://www.bkjia.com/PHPjc/752521.html techarticle in the design of some systems, often need to give users to operate the prompt. This hint is important, and friendly hints can improve the user's goodwill towards the system. Operation tips There are many designs ...