I am setting up a survey on Qualtrics. One question has a text box, in which participants shall write 100-130 words. I want to have a word counter so people can see how much they have written already. Can anyone help me out with a Javascript code for a word counter that is usable in Qualtrics? Thank you very much!
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Add an element with an id of 'wordCount' to the question text(in html editing mode) like this.
Then in the question's Javascript input the following:
This observes any keypress on the first textbox on the page(This assumes you only have this question on the page), and updates the wordCount elements contained text to be the number of words in the textbox. It updates on any keypress.