There is no limit on using javascript in local files (i think).
But the default WebView does not support javascript modal dialogs such as alert and prompt.
To enable such dialog boxes you need to add a WebChromeClient - now when javascript calls alert and prompt methods you will see the dialog box.