JS: Get the minimum value in the text box
Effect: Minimum value
Event: After the input value, obtain the minimum value.
Code:
1 /* Minimum value of a single block */ 2 Function Gettbqdzxz (){ 3 VaR Tbkyqd1 = changefloat ($ ("# <% = tbkyqd1.clientid %>" ). Val ()); 4 VaR Tbkyqd2 = changefloat ($ ("# <% = tbkyqd2.clientid %>"). Val ()); 5 VaR Tbkyqd3 = changefloat ($ ("# <% = tbkyqd3.clientid %>" ). Val ()); 6 VaR Tbkyqd4 = changefloat ($ ("# <% = tbkyqd4.clientid %>" ). Val ()); 7 VaR Tbkyqd5 = changefloat ($ ("# <% = tbkyqd5.clientid %>" ). Val ()); 8 9 If (Tbkyqd1! = 0 & tbkyqd2! = 0 & tbkyqd3! = 0 & tbkyqd4! = 0 & tbkyqd5! = 0 ){ 10 VaR Numbers = [Tbkyqd1, tbkyqd2, tbkyqd3, tbkyqd4, tbkyqd5]; 11 Numbers = numbers. Sort ( Function (A, B ){ 12 Return A- B; 13 }); 14 $ ("# <% = Tbqdzxz. clientid %>"). Val (numbers [0 ]); 15 } 16 Else { 17 $ ("# <% = Tbqdzxz. clientid %>"). Val ("" ); 18 } 19 } 20 21 Function Changefloat (data ){ 22 If (Data! = Null & Data! = "" ) 23 Return Parsefloat (data ); 24 Else 25 Return 0 ; 26 }