How to give mask to WebTextField

Hello ,
I am new with xojo web applications.
We need to give mask to textfield like zip code(99999-9999),date(9999-99-99) etc using jquery.
we have used following javascript code:

  dim aa as new WebTextArea
  
  aa.AppendText "  $('#" +txtZipCode.ControlID +"').ready(function() {"+EndOfLine
  aa.AppendText "  $('#" +txtZipCode.ControlID +"').mask('99999-9999');"+EndOfLine
  aa.AppendText " });"+EndOfLine
  
  ExecuteJavaScript(aa.Text)

Also we have added script in app.Header.
This code gives error while executing javascript.
can anyone tell me how to mask zipcode or date ?