Home >Web Front-end >JS Tutorial >A select written in javascript supports the functions of up and down keys, initial letter filtering and carriage return to get values_javascript skills
It can be called like this:
1, tempStr=GetNewSelectStr(dataTable.value,"select" rowIndex,true);
2,makeSelectBox("select" rowIndex,tempStr,value,obj);
tempStr - This is the frame of the returned drop-down list value
dataTable.value - This is the data source (I am a table here)
"select" rowIndex - This is the ID number, that is The ID number of the current select (I have multiple selects here, so the ID number is automatic)
true - this is the identifier that controls the drop-down box that appears when clicked
value - this is initially displayed in The value in the select input box
obj - this is the object to display the select
Source code: