How can you use Javascript in terminal for w3m?
Javascript requires a Javascript interpreter. If your user-agent doesn't understand a particular kind of scripting, it simply ignores it. To get a minimal level of support, try the w3m-js extension.
Try Conkeror
Masi -- I'd recommend taking a look at Conkeror, which is basically Firefox with Emacs keybindings. If you want a keyboard driven UI with Javascript,it's your best bet:
http://www.saltycrane.com/blog/2008/01/firefox-for-emacs-users/
The frontpage could use a makeover, but once you download and install it you'll wonder why you never tried it before...
(and if you're a vim user, you could try vimperator).