my computer display works for a sec

If it is an older flat screen, take a flash light and shine it on the screen to see if the screen is OFF or just unlit. When a screen gets too old, the back light can fail leading to exactly things type of thing(tries to light then the light shuts down).

If it is not this, try to see if it stays on when entering the bios on the system(DEL or F1[sometimes F10] on startup for most systems).