Javascript as content parameter for update_element_function?

Is there any way to do this? The goal is to have the
update_element_function
update a div with alternating strings. Is there a better way to do this?

Thanks!