The onclick takes JS code. The JS function called “update” updates the perchance stuff across the whole page. If you pass an element to the update function, it will only update that element.
So in my test, I have an element with the id “output.” So just passing output to the update() function means I’m passing a reference to that element with the id “output.” And then only that element is updated.
Are you trying to make a new generator? How is this related to the character you have on the character AI chat?