onClick javascript

Results 1 to 2 of 2

Thread: onClick javascript

  1. #1
    Join Date
    Dec 1969

    Default onClick javascript

    Hey guys how do you &#060;input type=Whatever onClick="javascript:<BR>I want to increment a variable here something like<BR>&#060;input type=Whatever onClick="javascript:var foo= foo + 1;"&#062;<BR>Is it possible?????<BR><BR>

  2. #2
    Bruno Santos Guest

    Default RE: onClick javascript

    Hi Amy!<BR><BR>Of course, you can do that. You could also use the ++ feature:<BR><BR>&#060;input type=Whatever onClick="javascript:foo++"&#062;<BR><BR>But what is this increment for? If you want to put this new value into a textbox, you must do it in a explicit form:<BR><BR>&#060;input type=text name=mytextbox id=mytextbox&#062;<BR>&#060;input type=Whatever onClick="javascript:mytextbox.value=++foo;"&#062;< BR><BR>Bruno &#060;brunosantos@rj.net&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts