hi Karl, thanks for your reply.
On Jan 14, 2008 10:51 PM, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Xinhao, > If you have special characters in the selector value, you'll need to > escape them with two backslashes: > > > http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F > > If you're storing the id attribute in a variable, you could use a regex > .replace() to escape the brackets. For example: > > var myId = $('someElement').attr('id').replace(/(\[|\])/g,'\\\\$1') > > -- Xinhao Zheng SGL中文文档: http://wiki.cjcht.com SGL中文Group:http://groups.google.com/group/seagull_forum