On the confession of the defendant, with the assent of the plaintiff or his or her attorney, judgment may be given against the defendant in any action before or after answer, for any amount or relief not exceeding or different from that demanded in the complaint.