how to increase the values in text box in a given text box
increament by two values by clicking on button



how to increase the values in text box in a given text box increament by two values by clicking on..

Answer / Yamuna Kumar Nirala

To increment the value in a TextBox by two using VBScript, you can use the following code for the Button's OnClick event:

Function Button1_OnClick()
Dim txtBox, intCurrentValue, intNewValue
Set txtBox = Document.getElementById("yourTextboxID")
intCurrentValue = txtBox.value
intNewValue = intCurrentValue + 2
txtBox.value = intNewValue
End Function

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

If else for do while select in vb script?

1 Answers  


What is vbscript language used for and which earlier language is it modeled upon?

1 Answers  


What are keywords in the vbscript language?

1 Answers  


How do I check that the names in a weblist are correct e.g in flight application the names of item are Denver, paris,London, etc. How do I ensure the correct item is displayed from the list after doing item count ?

2 Answers   IBM,


In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

1 Answers   Nous,


what is the differance between BYVAL,BYREF?

1 Answers  


i created script for login in QTP,i parametirized that using global sheet,problem i am facing is first i want to login with first values provided in excelsheet and want to perform some operation,second time if call same action it should login with second values in excelsheet

2 Answers   TCS,


Can u describe what kind of testing are for OTC derivates by banks.

1 Answers   BoA,


Mention what are the rules to name variable in vbscript?

1 Answers  


compare the string without using stringcomp function?

1 Answers   CSS Corp,


Explain some uses of vb script?

1 Answers  


What are class variables?

1 Answers  


Categories