เราสามารถเช็คได้ไหมคะ ว่า id ไหนเรียกใช้ function

ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา เราสามารถเช็คได้ไหมคะ ว่า id ไหนเรียกใช้ function

เราสามารถเช็คได้ไหมคะ ว่า id ไหนเรียกใช้ function
	เราสามารถเช็คได้ไหมคะ ว่า id ไหนเรียกใช้ function ถ้ามี  $( "#combobox" ).combobox();  $( "#combobox1" ).combobox(); เราจะรู้ได้ไหมว่าcombobox หรือ combobox1 เรียกใช้
<script> (function( $ ) { $.widget( "ui.combobox", { _create: function() { var input, self = this, select = this.element.hide(), selected = select.children( ":selected" ), value = selected.val() ? selected.text() : "", wrapper = this.wrapper = $( "<span>" ) .addClass( "ui-combobox" ) .insertAfter( select ); input = $( "<input>" ) .appendTo( wrapper ) .val( value ) .addClass( "ui-state-default ui-combobox-input" ) .autocomplete({ delay: 0, minLength: 0, source: function( request, response ) {//click var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); response( select.children( "option" ).map(function() { var text = $( this ).text(); if ( this.value && ( !request.term || matcher.test(text) ) ) return { label: text.replace( new RegExp( "(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi" ), "<strong>$1</strong>" ), value: text, option: this }; }) ); }, select: function( event, ui ) { var selectedObj = ui.item; ui.item.option.selected = true; self._trigger( "selected", event, { item: ui.item.option }); //show_table(ui.item.value); }, change: function( event, ui ) { if ( !ui.item ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ), valid = false; select.children( "option" ).each(function() { if ( $( this ).text().match( matcher ) ) { this.selected = valid = true; return false; }//fncSubmit(2); }); if ( !valid ) { // remove invalid value, as it didn't match anything $( this ).val( "" ); select.val( "" ); input.data( "autocomplete" ).term = ""; return false; } } } }) .addClass( "ui-widget ui-widget-content ui-corner-left" ); input.data( "autocomplete" )._renderItem = function( ul, item ) { return $( "<li></li>" ) .data( "item.autocomplete", item ) .append( "<a>" + item.label + "</a>" ) .appendTo( ul ); }; $( "<a>" ) .attr( "tabIndex", -1 ) .attr( "title", "Show All Items" ) .appendTo( wrapper ) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }) .removeClass( "ui-corner-all" ) .addClass( "ui-corner-right ui-combobox-toggle" ) .click(function() { // close if already visible if ( input.autocomplete( "widget" ).is( ":visible" ) ) { input.autocomplete( "close" ); return; } // work around a bug (likely same cause as #5265) $( this ).blur(); // pass empty string as value to search for, displaying all results input.autocomplete( "search", "" ); input.focus(); }); }, destroy: function() { this.wrapper.remove(); this.element.show(); $.Widget.prototype.destroy.call( this ); } }); })( jQuery ); $(function() { $( "#combobox" ).combobox(); $( "#combobox1" ).combobox(); }); </script>

 



1081009 180.183.145.xxx 07-09-2012 01:42:00

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
  • เปลี่ยน


    ( หรือ เข้าใช้งานผ่าน Social Login )

 ความคิดเห็นที่ 1

  เราสามารถเช็คได้ไหมคะ ว่า id ไหนเรียกใช้ function ถ้ามี

 $( "#combobox" ).combobox();  $( "#combobox1" ).combobox(); เราจะรู้ได้ไหมว่าcombobox หรือ combobox1 เรียกใช้

# มือใหม่ post ขออภัยนะคะ


1081009 180.183.145.xxx 07-09-2012 01:44






เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ