When the focus of an X-ray tube in an X-rays generator is to be made extremely small, a first electrode closest to a cathode out of two or more intermediate electrodes (2b, 2c, 2d) arranged between a cathode (2a) and a target (3) must be brought as close as possible to the cathode, and thereby causing the problem of temperature rise of the first electrode. In the invention, even if the thermal capacity of the first electrode is increased by applying the same potential as that of a container (1) to the first electrode to allow it to touch the container, the function of the X-rays generator is not damaged. Positional relation between an electron gun and the container is determined by allowing the first electrode to touch the container, and assembling work of the X-rays generator is facilitated. Furthermore, management of a power supply is facilitated because the potentials of the cathode, the intermediate electrodes (e.g. the second electrode, the third electrode) and the target are all at positive polarity with respect to the potential of the first electrode.