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());
};
Ïà¹ØÎĵµ£º
EvalÊÇasp.net1.1Öг£
Óõİó¶¨Óï·¨£¬ËüÊÇ“µ¥Ïò”µÄ£¬¼´°ó¶¨Ê±°ÑÊý¾ÝÔ´ÉÏÏàÓ¦µÄÖµ¸³µ½¸Ã¿Ø¼þÉÏ£¬EvalµÄÈÎÎñ¾ÍÍê³ÉÁË
¶øBindËùνµÄ“Ë«Ïò”¾ÍÊÇ£ºÔÚ°ó¶¨Ê±£¬°Ñ
Êý¾ÝÔ´ÉÏÏàÓ¦µÄÖµ¸³µ½¸Ã¿Ø¼þÉÏ£¬²¢ÇÒ£¬ÔÚÌύʱ£¬×Ô¶¯ÌáÈ¡Óû§ÔڸÿؼþÉÏÊäÈëµÄÖµ¡£
Code
<
EditItemTemplate
>
&nb ......
ËÆË®Á÷Ä걨¸æÁË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ÏîÄ¿µÄÇ¨ÒÆ×¼±¸ºÃ¹¤¾ß£¬Ö÷Òª¹¤×÷¾ÍÊÇת»¯ÏîÄ¿ÀàÐÍ£¬¸üгÌÐò¼¯µÄÒýÓúÍÉú³ÉÅäÖÃÐ ......
Ò»).´´½¨²¿ÊðÏîÄ¿
1. ÔÚ“Îļþ”²Ëµ¥ÉÏÖ¸Ïò“Ìí¼ÓÏîÄ¿”£¬È»ºóÑ¡Ôñ“н¨ÏîÄ¿”¡£
2. ÔÚ“Ìí¼ÓÐÂÏîÄ¿”¶Ô»°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿ÀàÐÍ”´°¸ñÖеē°²×°ºÍ²¿ÊðÏîÄ¿”£¬È»ºóÑ¡Ôñ“Ä£°å”´°¸ñ ......
×î½ü¹«Ë¾ÐèÒª¿ª·¢Ò»¸ö¼òÀúµ¼È빦ÄÜ£¬ÀàËÆ²©¿Í°á¼Ò»òÕßÓÊÏä°á¼Ò£¬Ö®Ç°×¥È¡ÐÅÏ¢ÊÇÀûÓû𳵲ɼ¯Æ÷£¬µ«ÊǼòÀúµ¼È빦ÄÜÐèÒªÓû§µÇ½ÒÔºó²ÅÄÜ»ñÈ¡¼òÀúÊý¾Ý£¬ÎÞÄÎÖ»ºÃ×Ô¼º¿ª·¢ÁË¡£
Ê×ÏÈÊÇÓöµ½µÄÎÊÌâÊÇ£ºÈçºÎʵÏÖÄ£ÄâµÇ½£¿
ÎÒÃÇÖªµÀÒ»°ãµÄÍøÕ¾¶¼ÊÇͨ¹ýCookiesÀ´Î¬»¤×´Ì¬µÄ£¬ÎÒ×¥µÄÍøÕ¾Ò²ÊÇÖ§³ÖÀûÓÃCookiesÀ´ÑéÖ¤Óû§µÄ£¬¹¹ÔìÒ»¸ö ......
1.ÉèÖÃweb.configÎļþ.
<system.web>
......
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312" />
......
</system.web>
»òÕߣº
aspxÎļþÖÐ:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"&g ......