
114 Cal.App.2d 488 (1952)
IVAN R. ROLLINS, Respondent,
v.
BYRON HEDIN et al., Appellants.
Civ. No. 15078. 
California Court of Appeals. First Dist., Div. Two.  
Dec. 1, 1952.
 E. C. Mahoney for Appellants.
 Saul N. Ross for Respondent.
 DOOLING, J.
 Defendants, husband and wife, appeal from a judgment rendered by the court in a trial without a jury for personal injuries incurred by plaintiff in an encounter with a dog owned by defendants. The complaint charged that the dog was "of a ferocious, vicious and mischievous disposition and accustomed to attack persons and possessed of traits making said dog dangerous to persons, all of which was known to said defendants." The plaintiff's proof showed that while he was walking along the sidewalk in front of defendants' residence in the city of San Bruno the dog approached him from behind, seized his trouser leg and twisted around in front of him throwing him violently to the sidewalk. He received injuries to an elbow and knee necessitating hospitalization for 12 days and surgery on both elbow and knee.
 At the close of plaintiff's case the transcript shows the following proceedings:
 "Mr. Ross: ... If the Court please, at this time I would like to offer in evidence a certified copy of the City Ordinance of San Bruno, City Ordinance No. 298, known as health and safety ordinance No. 20."
 "The Court: You can read it later, if you want. It will be admitted. * * *"
 "Mr. Ross: ... (reading)"
 " 'Section 3. It shall be unlawful for the owner or person having possession of or in charge of any dog or dogs to allow the same to be or remain upon any public street or place in said city without being securely fastened or held by a leash, chain, or rope or cord and led or held by some person or otherwise securely fastened or held.' "
 The record shows that this ordinance was introduced and section 3 thereof read without any objection. Appellants baldly state that "(d)efendants were then precluded from objecting to the introduction of the ordinance." The record does not *490 bear this out. [1] In the absence of any objection to the introduction of the ordinance it is not open to appellants to argue for the first time on appeal that the complaint was not based on a violation of the ordinance. "It is unfair for a party to withhold an objection to a pleading founded upon a defect, which, if pointed out in time might have been remedied by amendment, thereby inducing his opponent to rely upon his pleading as sufficient, until it is too late to correct the defect, in order that he may have the advantage of the fatal defect on appeal." (Viglione v. City and County of San Francisco, 109 Cal.App.2d 158, 160 [240 P.2d 68].) "Parties will not be permitted to lie by and keep silent when evidence is offered, and after the court has rendered its judgment, object thereto upon the ground that the evidence sustaining it was inadmissible under the issues presented by the pleadings." (Poledori v. Newman, 116 Cal. 375, 378 [48 P. 325]; Colbert v. Colbert, 28 Cal.2d 276, 281 [169 P.2d 633].)
 [2] There was evidence of an admission by appellant husband that he knew the trait of the dog: "He said ... he had done them things before, he had run after people ... he had never caused any of them to hurt themselves ... I guess I should get rid of the dog because he has done these things before." While this evidence was contradicted it is sufficient to support the trial court's conclusion of knowledge by appellant husband of the danger of permitting the dog to run at large. There is no evidence of such knowledge by appellant wife, but the court found the violation of the ordinance and proximate injury to respondent. [3] A "leash ordinance" such as here involved is designed for the protection of the public from dogs running at large and where its violation proximately causes injury to a plaintiff he may recover therefor against the owner. (Brotemarkle v. Snyder, 99 Cal.App.2d 388 [221 P.2d 992].)
 [4] The court allowed $720.63 for medical expenses, $450 for loss of earnings and $100 general damages. The bills for medical expenses were admitted pursuant to the following stipulation:
 "Mr. Ross: Mr. Mahoney, will you stipulate as to these various bills, all of which have been paid, as indicated on the face of them?"
 "Mr. Mahoney: Yes."
 In the face of this stipulation appellants are now foreclosed from arguing that the reasonableness of the charges was not proved. *491
 [5] The loss of earnings was established by respondent's testimony that he earned $75 per week, was not able to go back to work after he left the hospital and "was out of work about six weeks."
 [6] Some hearsay evidence of what his doctors told respondent concerning his injuries was admitted over objection. This caused appellants no prejudice since the award for general damages was only $100 and this is amply supported by the evidence properly admitted.
 Judgment affirmed.
 Nourse, P. J., and Goodell, J., concurred.
