TS1398: iOS: Troubleshooting Wi-Fi networks and connectionsLearn about iOS: Troubleshooting Wi-Fi networks and connections
Start by doing a reboot of the iPhone, hold both the power and home buttons until the apple logo appears and it restars, ignoring the red slider if it appears.
Your subject refers to a knowledge base article, http://support.apple.com/kb/HT1398 did you follow all of the steps in that troubleshooting article? Especially note that the step to reset the router - you must disconnect the power to the router for a few minutes and then reconnect and power up the router. After it has powered up then try and connect the iPhone.
Many routers do not power down with the power button but, instead, only go into stnadby mode. They have to power down so they can get a new starting IP address from the ISP.
Thanks but we tried all steps the same problem has been occured during the ios 6.1.1 updated but it took about one week and corrected with the updating of ios 6.1.2 . unfortunately since 6.1.3 updating I'm living with this
inconvenient problem what should I do?
This is the Knowledge Base article that refers to your specific problem: http://support.apple.com/kb/TS1559
Please carefully go through all of the steps in the article. If it does not resolve the issue you may have a hardware problem. This would be unfortunate, because Apple will only repair a phone in the country where it was purchased.
BTW, a greyed out WiFi switch is definitely a problem in the phone; it is not a router problem. If WiFi could be enabled on the phone but could not connect to your network that might be a router issue.
Please post the results of the diagnostic steps; if nothing works there are a few other tricks to try.