Due to the option results='asis', we can write anything to the output, including JavaScript. Here are some examples:
results='asis'