Hello ZingXao.
Sorry to see you're having wifi connection issues.
Sometimes dropouts such as you describe are attributed to the router itself, rather than the device. A good thing to do is restart the router and then test for those dropouts over the course of a day.
If they still occur, the next step is to make sure your device is not struggling for a signal. Go into the wifi settings and, with wifi enabled via the check box in the wireless menu, remove the SSID name and then turn off wifi. Power down your phone, then turn it back on and start over with the wifi settings.
If things don't get better, try going into the router settings and change the channel it operates on, then restart it and your phone again (do that after any change in settings).