应该是SetCookie("RFieldName","this is red")吧<script>
function SetCookie (name,value,expires,path,domain,secure) {
            document.cookie = name + "=" + escape (value) +
            ((expires) ? "; expires=" + expires.toGMTString() : "") +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            ((secure) ? "; secure" : "");
      }
SetCookie("RFieldName","this is red")
alert(document.cookie);
</script>

解决方案 »

  1.   

    what is in RFieldName? if its value is "RFieldName", tryecho $HTTP_COOKIE_VARS["RFieldName"];
      

  2.   

    saucer(思归)用你的方法:
      echo $HTTP_COOKIE_VARS["RFieldName"];
    不行呀.如果我定義的是:
      SetCookie("RFieldName",旭基石碣");
    它顯示的結果是:%u87BA%u67F1%u5716%u9762.
      

  3.   

    you used escape() in SetCookie, try something like this (I did not test it, so it might not work)
    echo urldecode($HTTP_COOKIE_VARS["RFieldName"]);
      

  4.   

    saucer(思归) 這樣做也不行.不過還是要謝謝你.
      

  5.   

    用下面的urlencoding替换escape
    <script language="vbscript">
    function urlencoding(vstrin)
    dim i,strreturn
        strreturn = ""
        for i = 1 to len(vstrin)
            thischr = mid(vstrin,i,1)
            if abs(asc(thischr)) < &hff then
                strreturn = strreturn & thischr
            else
                innercode = asc(thischr)
                if innercode < 0 then
                    innercode = innercode + &h10000
                end if
                hight8 = (innercode  and &hff00)\ &hff
                low8 = innercode and &hff
                strreturn = strreturn & "%" & hex(hight8) &  "%" & hex(low8)
            end if
        next
        urlencoding = strreturn
    end function
    </script>
    示例:
    <script language=javascript>
    document.write(urlencoding("中国"));
    </script>这样可以urldecode
    <?
    die(urldecode("%D6%D0%B9%FA"));
    ?>
      

  6.   

    qiushuiwuhen(秋水无恨):Is Very Good! Thank you!!!