google suggest ÏÂÀ²Ëµ¥(asp.net/jQuery°æ±¾)
suggest.jsÎļþ£¨ÔÚÒýÈësuggest.jsÎļþǰÐèÒªÏÈÒýÈëjquery-1.4.2.min.js£©£º
$(function() {
var k = -1;
//¸ø²éѯÎı¾¿ò°ó¶¨click keyupʼþ£¬½øÐÐÕâÁ½¸öʼþ£¬×Ô¶¯²éѯÊý¾Ý
$("#FrmChangshang").bind('click keyup', function(event) {
//»ñÈ¡¼üÅ̲Ù×÷ʼþ´úÂë
var keyc = event.keyCode || event.which || event.charCode;
//²éѯÊý¾ÝΪ¿Õ£¬»òÕß¼üÅ̲Ù×÷´úÂëΪÉÏÏÂÒÆ¶¯¼ü£¬²»½øÐвéѯ²Ù×÷
if ($("#FrmChangshang").val().length > 0 && keyc != 38 && keyc != 40) {
$.ajax({
url: "SearchCompany.ashx",
//firefoxϱØÐë¶ÔcnameµÄ±àÂ룬·ñÔòÈ¡²»µ½Êý¾Ý£¬×ª»»Îªutf-8Ò²¿ÉÒÔ
data: "cname=" + escape($("#FrmChangshang").val()),
type: "get",
cache: false,
dataType: "xml",
beforeSend: function(XMLHttpRequest) {
//ÇëÇóǰ£¬ÁбíÔøÏÔʾ¼ÓÔØÊý¾ÝÌáʾ
$("#name_table_body").append("<tr><td>Êý¾Ý¼ÓÔØÖÐ......</td></tr>");
},
success: function(data, textStatus) {
//ÉèÖòãÑùʽ
divsOffset();
//ÏÈÇå¿ÕÁбí
$("#name_table_body").html("");
//·µ»ØÊý¾Ý³É¹¦£¬Ìí¼Óµ½Áбí,²¢Îª´´½¨µÄ±í¸ñtdÌí¼ÓÏàÓ¦ÊôÐÔ
$("content", data).each(function(i, domEle) {
$("<tr></tr>").append($("<td></td>", {
mouseout: function() {
$(this).css({ "backgroundColor": "#ffffff", "font-size": "15px", "color": "#000000" });
},
mouseover: function(tdi) {
return function() {
k = tdi; setStyle(k);
$("#FrmChangshang").val($(this).text());
};
Ïà¹ØÎĵµ£º
ËÆË®Á÷Ä걨¸æÁËASP.NET MVC 2 Õýʽ·¢²¼£¬ÄÇôÎÒÃÇÓÐÐí¶àASP.NET MVC 1.0µÄ³ÌÐòÐèÒªÒÆÖ²µ½2.0Ôõô°ìÄØ£¿Eilon Lipton ÒѾ·¢²¼ÁËһƪ²©ÎÄ migration tool for converting ASP.NET MVC 1 application projects£¬ÎªÎÒÃǵÄVisual Studio 2008µÄMVCÏîÄ¿µÄÇ¨ÒÆ×¼±¸ºÃ¹¤¾ß£¬Ö÷Òª¹¤×÷¾ÍÊÇת»¯ÏîÄ¿ÀàÐÍ£¬¸üгÌÐò¼¯µÄÒýÓúÍÉú³ÉÅäÖÃÐ ......
ÔÚ°²È«ÐÔÒªÇó²»ÊǺܸߵÄASP.Net³ÌÐòÖУ¬»ùÓÚFormsµÄÉí·ÝÑéÖ¤ÊǾ³£Ê¹ÓõÄÒ»ÖÖ·½Ê½£¬¶øÈç¹ûÐèÒª¶ÔWebService½øÐÐÉí·ÝÑéÖ¤£¬×î³£ÓõĿÉÄÜÊÇ»ùÓÚSoap ±êÍ·µÄ×Ô¶¨ÒåÉí·ÝÑéÖ¤·½Ê½¡£Èç¹û¶ÔÁ½Õß×öһϱȽϵϰ£¬ÏÔÈ»£¬»ùÓÚFormsµÄÑéÖ¤·½Ê½¸ü¼Ó·½±ãÒ×Óã¬ÄÜ·ñ½«FormsÑéÖ¤·½Ê½Ó¦Óõ½WebServiceÖÐÈ¥ÄØ£¿
´ÓÀíÂÛÉ ......
ҪʵÏÖa¿Ø¼þ¿Ø¼þ´¥·¢b¿Ø¼þ·þÎñÆ÷¶Ëʼþ£¬Ðè¸øa¿Ø¼þÌí¼Ójs½Å±¾£¬ÒÔb¿Ø¼þÃûÒåÌá½»Ò³Ãæ£¬¾ßÌå´úÂ룺
var theForm = document.forms['form1'];
theForm.__EVENTTARGET.value = "b"; //´¥·¢b¿Ø¼þ·þÎñÆ÷¶Ë·½·¨
theForm.__EVENTARGUMENT.value = "a trigger";//´«µÝµÄ²ÎÊý
theForm.submit();
×¢Ò⣺ÐèÒªÉèÖÃÒ³ÃæÊôÐÔÖÐµÄ enab ......