No its not really different from HTML at all. Also there is nothing stopping you from adding regular HTML into your page if need be
<script>....</script>
You can use any of the methods / functions / controls that XPages provides with it.
If your writing functions the easiest way would be to add a javascript library to your application and add it too your page (almost exactly the same as added a javascript file to a HTML page), just because its good to separate out the code. If you post an example of what your trying to do I can take a look at it but your original post is quite vague. Below is an example of a client side function being called inside a button and modifying a label.
<xp:label id="testLabel">
</xp:label>
<xp:button value="test" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xp:executeClientScript>
<xp:this.script><![CDATA[
function test(str)
{
var lbl = dojo.byId("#{id:testLabel}");
lbl.innerHTML = str;
}
test("example");
]]></xp:this.script>
</xp:executeClientScript>
</xp:this.script>
</xp:eventHandler>
</xp:button>