Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavascriptʵÏÖÈÕÆÚʱ¼äµÄµ¹¼ÆÊ±

<html>
<body>
<SCRIPT type="text/javascript">
<!--
var target=[]
var time_id=[]
function ShowDateTime(){
    setTimeout("ShowDateTime()", 1000);
for (var i=0,j=target.length;i<j;i++)
{
    var today=new Date();
    timeold=target[i]-today.getTime();   //¹²¶àÉÙºÁÃë
    msPerDay=24*60*60*1000;              //Ò»ÌìÓжàÉÙºÁÃë
    e_daysold=timeold/msPerDay;
    daysold=Math.floor(e_daysold);
    e_hrsold=(e_daysold-daysold)*24;
    hrsold=Math.floor(e_hrsold);
    e_minsold=(e_hrsold-hrsold)*60;
    minsold=Math.floor((e_hrsold-hrsold)*60);
    seconds=Math.floor((e_minsold-minsold)*60);
    if (daysold<0)
    {
        document.getElementById(time_id[i]).innerHTML="ÓâÆÚ,µ¹¼ÆÊ±ÒѾ­Ê§Ð§";
    } 
    else
    {
        if (daysold<10) {daysold="0"+daysold}
        if (hrsold<10) {hrsold="0"+hrsold}
        if (minsold<10) {minsold="0"+minsold}
        if (seconds<10) {seconds="0"+seconds}
        if (daysold<3) {
            document.getElementById(time_id[i]).innerHTML="<font color=red>"+daysold+"Ìì"+hrsold+"Сʱ"+minsold+"·Ö"+seconds+"Ãë</font>";
        } 
        else {
            document.getElementById(time_id[i]).innerHTML=daysold+"Ìì"+hrsold+"Сʱ"+minsold+"·Ö"+seconds


Ïà¹ØÎĵµ£º

JavaScript µ÷Óúǫ́ʼþºÍ·½·¨

1¡¢ºǫ́·½·¨£º
protected string CsharpVoid(string strCC)
{
strCC = "http://" + strCC;
return strCC;
}
2¡¢Ç°Ì¨Ò³ÃæJavaScript·½·¨£º
<script language="javascript" type="text/javascript">
var v = "www.baidu.com";
var s = '<%=CsharpVoid("'+v+'")%>';
document.write(s);
< ......

C#ºǫ́µ÷ÓÃǰ̨javascriptµÄÎåÖÖ·½·¨


ÓÉÓÚÏîÄ¿ÐèÒª£¬Óõ½ÆäËûÏîÄ¿×éÓÃVC¿ª·¢µÄ×é¼þ£¬ÔÚwebºǫ́´úÂëÎÞ·¨·ÃÎÊÕâ¸ö×é¼þ£¬ËùÒÔÖ»ºÃͨ¹ýºǫ́µ÷ÓÃǰ̨µÄjavascript£¬´Ó¶ø²Ù×÷Õâ¸ö×é¼þ¡£ÔÚÍøÉÏÕÒÁËÕÒ£¬·¢ÏÖÓÐÈýÖÖ·½·¨¿ÉÒÔ·ÃÎʵ½Ç°Ì¨´úÂ룺
µÚÒ»ÖÖ£¬OnClientClick    (vs2003²»Ö§³ÖÕâ¸ö·½·¨)
<asp:Button ID="Button1" runat="se ......

flex ºÍjavascript»¥Ïàµ÷ÓÃ

flex ºÍjavascript»¥Ïàµ÷Óá£
Ò»¡¢flex µ÷ÓÃjavascript
  Ö»ÐèʹÓþ²Ì¬µÄExternalInterface.call¾Í¿ÉÒÔÁË¡£
  call ·½·¨ÖÁÉÙÒªÇóÒ»¸ö²ÎÊý£¬¾ÍËùµ÷ÓöÊýµÄÃû³Æ¡£
  Ò²¿ÉÒÔ´«µÝ²ÎÊý¡£
  È磺
    ExternalInterface.call("alert","hello");
   "hello"¾ÍÊÇ×÷Ϊalertµ ......

JavaScriptÅжÏä¯ÀÀÆ÷ÀàÐͼ°°æ±¾

      ͨ¹ý·ÖÎö¸÷Ààä¯ÀÀÆ÷µÄuserAgentÐÅÏ¢£¬²»Äѵóö·Ö±æ¸÷Ààä¯ÀÀÆ÷¼°Æä°æ±¾µÄÕýÔò±í´ïʽ¡£¶øÇÒ£¬¶Ôä¯ÀÀÆ÷ÀàÐ͵ÄÅжϺͰ汾µÄÅжÏÍêÈ«¿ÉÒÔºÏΪһÌ嵨½øÐС£ÓÚÊÇ£¬ÎÒÃÇ¿ÉÒÔд³öÏÂÃæµÄ´úÂ룺
    <script type="text/javascript">
       ......

JavascriptʵÏÖ¹ö¶¯ÐÂÎÅ

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>¹ö¶¯ÐÂÎÅÀà</title>
<style type="text/css">
body {
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ