يدعم مربع قائمة SELECT SELPER SELPER وظيفة الاستعلام الغامضة للإدخال ، والتصميم سهل الاستخدام للغاية. شارك المحرر أدناه رمز المفتاح معك. يمكنك إضافة وتعديلها بشكل مناسب وفقًا لاحتياجاتك. إذا كان لديك أي أسئلة ، فالرجاء إعطائي ملاحظات.
رمز المفتاح كما يلي:
<html> <head> <meta http-equiv = 'content-type' content = 'text/html ؛ charset = gb2312 '> <title> مربع القابل للإدخال القابل للإدخال </title> </head> <body> <script language = "javaScript"> var j = 0 ؛ دالة selectValue (obj) {var input = obj.parentNode.nextsibling ؛ document.all.box2.value = obj.options [obj.selectedIndex] .text ؛ document.getElementById ("txtsection"). value = obj.options [obj.selectedIndex] .value ؛ ALERT (document.getElementById ("txtsection"). القيمة) ؛ } دالة inputValue (obj) {var n = 1 ؛ var tmpobj ؛ var src = document.all.selectOption ؛ var msg = document.all.msg ؛ if (event.keycode! = 40 && event.keycode! = 38 && event.keycode! = 13) {if (obj.value! = "") {msg.style.display = "" "؛ msg.innerhtml = "" ؛ if (msg.haschildnodes ()) {msg.childnodes [0] .ParentNode.removechild (msg.childnodes [0]) ؛ } لـ (var i = 0 ؛ i <src.length ؛ i ++) {var selvalue = document.createElement ("div") ؛ var seltext = document.createElement ("div") ؛ seltext.value = src (i) .value ؛ seltext.innerhtml = src (i) .text ؛ if (src (i) .text.toLowerCase (). indexof (obj.value.toLowerCase ()) == 0) {seltext.setattribute ("id" ، "seltext"+n) ؛ seltext.onmouseover = function () {this.style.backgroundColor = '#003399' ؛ this.style.color = '#ffffff' ؛ } seltext.onmouseout = function () {this.style.backgroundColor = '#ffffff' ؛ this.style.color = '#000000' ؛ } seltext.onclick = function () {document.all.box2.value = this.innerhtml ؛ msg.style.display = "none" ؛ document.getElementById ("txtsection"). value = this.value ؛ } msg.appendChild (seltext) ؛ n ++ ؛ }}} آخر {document.all.msg.style.display = "none" ؛ }} else {// اضغط على مفتاح Down if (event.keycode == 40) {j ++ ؛ لـ (var i = 0 ؛ i <src.length ؛ i ++) {tmpobj = document.getElementById ("seltext"+i) ؛ if (tmpobj! = null) {tmpobj.style.backgroundColor = '#ffffff' ؛ tmpobj.style.color = '#000000' ؛ }} tmpobj = document.getElementById ("seltext"+j) ؛ if (tmpobj! = null) {tmpobj.style.backgroundColor = '#003399' ؛ tmpobj.style.color = '#ffffff' ؛ } آخر {j = 0 ؛ }} // اضغط على المفتاح if (event.keycode == 38) {j-- ؛ لـ (var i = 0 ؛ i <src.length ؛ i ++) {tmpobj = document.getElementById ("seltext"+i) ؛ if (tmpobj! = null) {tmpobj.style.backgroundColor = '#ffffff' ؛ tmpobj.style.color = '#000000' ؛ }} tmpobj = document.getElementById ("seltext"+j) ؛ if (tmpobj! = null) {tmpobj.style.backgroundColor = '#003399' ؛ tmpobj.style.color = '#ffffff' ؛ } آخر {j = 2 ؛ }} // اضغط على مفتاح إدخال if (event.keycode == 13) {tmpobj = document.getElementById ("seltext"+j) ؛ document.all.box2.value = tmpobj.innerhtml ؛ msg.style.display = "none" ؛ document.getElementById ("txtsection"). value = tmpobj.value ؛ }}} وظيفة selmatch (src) {var curssel = document.all.box2.value ؛ لـ (var i = 0 ؛ i <src.length ؛ i ++) {if (src (i) .text == cursse) {src.options (i) .selected = true ؛ }}} وظيفة nomsg () {if (document.activeElement.id == "msg") return false ؛ else document.all.msg.style.display = 'none' ؛ } </script> <table border = 0 cellpadding = 1 cellpacing = 0> <tr> <td> <font face = "arial" size = "2" 22px ؛ onChange = "selectValue (this)" onClick = "selMatch (this)" id = "selectOption" name = "selectOption"> <Opture value = 'all' 'leved> all </potion> <orture value =' 0test1> 0test1 = testing 1 <orte value = 'section'> section = القسم الوصف : 14px ؛ الفضاء الأبيض: Nowrap ؛ overflow: Hidden ؛ما سبق هو رمز التنفيذ الخاص بوظيفة SELECT SELPER SELPER BOX FUZZY Buzzy التي قدمها لك المحرر. آمل أن يكون ذلك مفيدًا لك. إذا كان لديك أي أسئلة ، فيرجى ترك رسالة لي وسوف يرد المحرر إليك في الوقت المناسب. شكرا جزيلا لدعمكم لموقع wulin.com!