Home  >  Article  >  Web Front-end  >  A simple example of JS taking the minimum value in the text box_javascript skills

A simple example of JS taking the minimum value in the text box_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:11:461113browse

Effect: Take the minimum value

A simple example of JS taking the minimum value in the text box_javascript skills

A simple example of JS taking the minimum value in the text box_javascript skills

Event: After inputting a value, get the minimum value.

Code:

Copy code The code is as follows:

/*Single block minimum value* /
function Gettbqdzxz() {
var tbkyqd1 = ChangeFloat($("#<%=tbkyqd1.ClientID %>").val());
var tbkyqd2 = ChangeFloat($(" #<%=tbkyqd2.ClientID %>").val());
       var tbkyqd3 = ChangeFloat($("#<%=tbkyqd3.ClientID %>").val());
var tbkyqd4 = ChangeFloat($("#<%=tbkyqd4.ClientID %>").val());
var tbkyqd5 = ChangeFloat($("#<%=tbkyqd5.Client ID %> ;").val());

                                                                                                                                                                                        if (tbkyqd1 != 0 && tbkyqd2 != 0 && tbkyqd3 != 0 && tbkyqd4 != 0 && tbkyqd5 != 0) {
                 var numbers = [t bkyqd1, tbkyqd2, tbkyqd3, tbkyqd4, tbkyqd5];
               numbers = numbers.sort(function (a, b) {                                                         $("#<%=tbqdzxz.ClientID%>").val (numbers[0]);
            }
                                                                                                                                 }
                                                  

function ChangeFloat (data) { 🎜> }


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn