How to exit app

I used phonegap and I want when click Same button exit app
this function not. worked
navigator.app.exitApp();

include this file in index.html ?!