Asp.netÖÐ×Ô¶¨Òå¿Ø¼þÒýÓÃjavascriptÖеÄÈÕÀú½Å±¾ÐĵÃ
×Ô¶¨Òå¿Ø¼þÖеÄÒ³Ãæ´úÂ룺
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wcontrol.ascx.cs" Inherits="wcontrol" %>
<script type ="text/javascript">
function PopupCalendar(InstanceName)
{
///Global Tag
this.instanceName=InstanceName;
///Properties
this.separator="-"
this.oBtnTodayTitle="Today"
this.oBtnCancelTitle="Cancel"
this.weekDaySting=new Array("S","M","T","W","T","F","S");
this.monthSting=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
this.Width=200;
this.currDate=new Date();
this.today=new Date();
this.startYear=1970;
this.endYear=3010;
///Css
this.divBorderCss="1px solid #BCD0DE";
this.tableBorderColor="#CCCCCC"
///Method
this.Init=CalendarInit;
this.Fill=CalendarFill;
this.Refresh=CalendarRefresh;
this.Restore=CalendarRestore;
///HTMLObject
this.oTaget=null;
this.oPreviousCell=null;
this.sDIVID=InstanceName+"oDiv";
this.sTABLEID=InstanceName+"oTable";
this.sMONTHID=InstanceName+"oMonth";
this.sYEARID=InstanceName+"oYear";
}
function CalendarInit() ///Create panel
{
var sMonth,sYear
sMonth=this.currDate.getMonth();
sYear=this.currDate.getYear();
htmlAll="<div id='"+this.sDIVID+"' style='display:none;position:absolute;width:"+this.Width+";border:"+this.divBorderCss+";padding:2px;background-color:#FFFFFF'>";
htmlAll+="<div align='center'>";
/// Month
htmloMonth="<select id='"+this.sMONTHID+"' onchange=CalendarMonthChange("+this.instanceName+") style='width:10%'>";
for(i=0;i<12;i++)
{
htmloMonth+="<option value='"+i+"'>"+this.monthSting[i]+"</option>";
}
htmloMonth+="</select>";
/// Year
htmloYear="<select id='"+this.sYEARID+"' onchange=CalendarYearChange("+this.instanceName+") style='width:10%'>";
for(i=this.startYear;i<=this.endYear;i++)
{
htmloYear+="<option value='"+i+"'>"+i+"</option>";
}
htmloYear+="</select></div
Ïà¹ØÎĵµ£º
×î½üÔÚѧϰjavascript,¶ÔÓÚÈçºÎÔËÐе÷ÊÔÈ´²»Á˽⡣ÒÔΪÔÚ¼Çʱ¾Öб༺ÃÎļþºó±£´æÎªhtmÎļþ£¬È»ºóÔÚä¯ÀÀÆ÷Öдò¿ª¾Í¿ÉÒÔÁË£¬µ«ÎÒÊÔÁ˶à´Î¶¼²»³É¹¦£¬ºóÀ´ÖÕÓÚ·¢ÏÖÔÀ´ÎÒÔÚ¼Çʱ¾Öб༱£´æµÄÎļþµÄºó׺ÃûΪ“.txt”¡£
½â¾ö·½·¨£º“Îļþ¼ÐÑ¡Ïî&rdqu ......
ÒýÑÔ
Ôö¼Ó¿Í»§¶ËµÄ±íµ¥ÑéÖ¤¿ÉÒÔΪÓû§Ìṩ¸ü¿ìµÄÌåÑ飬µ«¾ö²»ÄܺöÊÓµÄÊÇ£¬¿Í»§¶Ë±íµ¥ÑéÖ¤ÓÀÔ¶²»Ó¦¸ÃÈ¡´ú·þÎñÆ÷¶ËµÄÑéÖ¤£¬¶øÖ»ÄÜÊǸ¨ÖúºÍÔöÇ¿¡£¸ù¾Ý¾ÑéJavaScriptÑéÖ¤±íµ¥»ù±¾·ÖΪÒÔϼ¸·½ÃæµÄÄÚÈÝ£¬±ØÌî×ֶΡ¢ÌØÊâģʽƥÅäµÈ£¬»¹Òª×¢Òâ´íÎóµÄÌáʾ·½Ê½¶ÔÒ»¸ö±íµ¥µÄ¿ÉÓÃÐÔÓÐ׿«ÆäÖØÒªµÄÓ°Ïì¡£
2½¨Á¢±íµ¥
&nb ......
eval()·½·¨ÔÚÔËÐÐʱʹÓ÷´ÉäÖ´ÐкóÆÚ°ó¶¨¼ÆË㣬Òò´ËÓë±ê×¼µÄASP.NETÊý¾Ý°ó¶¨·½·¨bindÏà±È£¬»áµ¼ÖÂÐÔÄÜÃ÷ÏÔϽµ¡£ËüÒ»°ãÓÃÔÚ°ó¶¨Ê±ÐèÒª¸ñʽ»¯×Ö·û´®µÄÇé¿öÏ¡£¶àÊýÇé¿ö¾¡Á¿ÉÙÓô˷½·¨
Eval ·½·¨ÊǾ²Ì¬£¨Ö»¶Á£©·½·¨£¬¸Ã·½·¨²ÉÓÃÊý¾Ý×ֶεÄÖµ×÷Ϊ²ÎÊý²¢½«Æä×÷Ϊ×Ö·û´®·µ»Ø¡£Bind ·½·¨Ö§³Ö¶Á/д¹¦ÄÜ£¬¿ÉÒÔ¼ìË÷Êý¾Ý°ó¶¨¿Ø¼þµÄÖ ......
//µÚÒ»ÖÖ·½Ê½
Response.Cookie("CookieÃû³Æ").value="Öµ" //дÈë
username=Request.Cookies("CookieÃû³Æ").value// ¶ÁÈ¡
//µÚ¶þÖÖ·½Ê½
HttpCookie hcCookic = new HttpCookie("CookieÃû³Æ","Öµ");
Response.Cookies.Add(hcCoo ......