Umm ... This is probably a misunderstanding.
Neither javascript itself nor any webbrowser (IE, FF, Opera, ...) can use XQuery or have support. You need other software that is implemented by XQuery (check out the link provided by Jonathan Sampson). This software can be called from your html site, and the results are displayed in a line
. wikibook XQuery eXist .