嗨,我在db 类中创建了一个函数
FUNCTION DB_Class($dbname, $username, $password) {
$this->db = MYSQL_CONNECT ('localhost', $username, $password)
or DIE ("Unable to connect to Database Server");
MYSQL_SELECT_DB ($dbname, $this->db) or DIE ("Could not select database");
}
如何在连接时在此函数中显示 js警报中的错误消息*失败*