|How can I get the number of words (instead of characters) from a string that's contained inside a textbox in VBScript? |
I used len and got 68 char but I have no idea how to get the # of words instead.
I would also need to show the answer in the span block id=answer1.
The code is below.
msgbox "john_val=" +cstr(john_len)
The string john = <input type="text" size="60" name="john" value="this is a string for the purpose of playing with string coding tools">
<li><span id="answer1">this is the contents of the span block with id answer1</span>
<li><span id="answer2">this is the contents of the span block with id answer2</span>
<input type="button" value="GO" onClick="fred">