Check which version of elinks you have.
ELinks 0.12pre6 #Not the version that supports ECMAScript
Other even less successful alternatives are noted also: links2 and w3m + w3m-js extension.
A quick summary of the commands for building an elinks that supports ECMAScript follows:
tar xjvf elinks-current-0.13.tar.bz2
#Check for ECMAScript support.
sudo make install