A connector comprising: a connector main body including an attachment surface configured to face a mounting surface of a substrate, the connector main body being configured to be mounted on the mounting surface; a connecting part provided to protrude from the connector main body, and project from an end surface of the mounting surface, the connecting part being configured to be connected to a mating connector; leg parts inserted into respective though holes formed in the substrate; and connecting ends (132, 152) which are electrically connected to the substrate; characterized in that first, second and third (173 or 174) leg parts are provided to protrude from the attachment surface, the first, second and third leg parts (171, 172, 173, 174) being configured to abut upon the mounting surface of the substrate and define a gap (L1, L2) between the attachment surface and said mounting surface, wherein the first leg part and the second leg part are provided on the attachment surface on the end surface side of the substrate relative to the third leg parts (173 or 174), wherein a weight part is provided on the rear end portion of the connector main body, and the first, second and third (173 or 174) leg parts are provided on the attachment surface such that a gravity center of the connector itself is located within regions of the triangle defined by connecting the centers of the said first, second and third (173 or 174) leg parts, wherein the connector is provided with a cutout part by cutting out an entirety of the connector main body at the attachment surface side, so that the connecting part protrudes from the end surface of the substrate, and the first leg part and the second leg part are each provided abutting on the connecting part. a connector main body including an attachment surface configured to face a mounting surface of a substrate, the connector main body being configured to be mounted on the mounting surface; a connecting part provided to protrude from the connector main body, and project from an end surface of the mounting surface, the connecting part being configured to be connected to a mating connector; leg parts inserted into respective though holes formed in the substrate; and connecting ends (132, 152) which are electrically connected to the substrate; characterized in that first, second and third (173 or 174) leg parts are provided to protrude from the attachment surface, the first, second and third leg parts (171, 172, 173, 174) being configured to abut upon the mounting surface of the substrate and define a gap (L1, L2) between the attachment surface and said mounting surface, wherein the first leg part and the second leg part are provided on the attachment surface on the end surface side of the substrate relative to the third leg parts (173 or 174), wherein a weight part is provided on the rear end portion of the connector main body, and the first, second and third (173 or 174) leg parts are provided on the attachment surface such that a gravity center of the connector itself is located within regions of the triangle defined by connecting the centers of the said first, second and third (173 or 174) leg parts, wherein the connector is provided with a cutout part by cutting out an entirety of the connector main body at the attachment surface side, so that the connecting part protrudes from the end surface of the substrate, and the first leg part and the second leg part are each provided abutting on the connecting part.