Ò»¡¢PHPº¯ÊýDate()»ñÈ¡µ±Ç°Ê±¼ä
´úÂ룺
<?php echo $showtime=date("Y-m-d H:i:s");?>
ÏÔʾµÄ¸ñʽ: Äê-ÔÂ-ÈÕ Ð¡Ê±:·ÖÖÓ:Ãë
Ïà¹Ø²ÎÊý£º
a£º"am"»òÕß"pm"
A£º"AM"»òÕß"PM"
d£º¼¸ÈÕ£¬¶þλÊý×Ö£¬Èô²»×ã¶þλÔòÇ°Ãæ²¹Á㣬Èç: "01"ÖÁ"31"
D£ºÐÇÆÚ¼¸£¬Èý¸öÓ¢ÎÄ×Öĸ£¬Èç: "Fri"
F£ºÔ·ݣ¬Ó¢ÎÄÈ«Ãû£¬Èç: "January"
h£º12 Ð¡Ê±ÖÆµÄСʱ£¬Èç: "01"ÖÁ"12"
H£º24 Ð¡Ê±ÖÆµÄСʱ£¬Èç: "00"ÖÁ"23"
g£º12 Ð¡Ê±ÖÆµÄСʱ£¬²»×ã¶þλ²»²¹Á㣬Èç: "1"ÖÁ12"
G£º24 Ð¡Ê±ÖÆµÄСʱ£¬²»×ã¶þλ²»²¹Á㣬Èç: "0"ÖÁ"23"
i£º·ÖÖÓ£¬Èç: "00"ÖÁ"59"
j£º¼¸ÈÕ£¬¶þλÊý×Ö£¬Èô²»×ã¶þλ²»²¹Á㣬Èç: "1"ÖÁ"31"
l£ºÐÇÆÚ¼¸£¬Ó¢ÎÄÈ«Ãû£¬È磺"Friday"
m£ºÔ·ݣ¬¶þλÊý×Ö£¬Èô²»×ã¶þλÔòÔÚÇ°Ãæ²¹Á㣻Èç: "01"ÖÁ"12"
n£ºÔ·ݣ¬¶þλÊý×Ö£¬Èô²»×ã¶þλÔò²»²¹Á㣻È磺"1"ÖÁ"12"
M£ºÔ·ݣ¬Èý¸öÓ¢ÎÄ×Öĸ£»È磺"Jan"
s£ºÃ룻È磺"00"ÖÁ"59"
S£º×Öβ¼ÓÓ¢ÎÄÐòÊý£¬¶þ¸öÓ¢ÎÄ×Öĸ£»È磺"th"¡¢"nd"
t£ºÖ¸¶¨Ô·ݵÄÌìÊý£»È磺"28"ÖÁ"31"
U£º×ÜÃëÊý
w£ºÊý×ÖÐ͵ÄÐÇÆÚ¼¸£¬Èç: "0"£¨ÐÇÆÚÈÕ£©ÖÁ"6"£¨ÐÇÆÚÁù£©
Y£ºÄ꣬ËÄλÊý×Ö£»È磺"1999"
y£ºÄ꣬¶þλÊý×Ö£»È磺"99"
z£ºÒ»ÄêÖеĵڼ¸Ì ......
<div id="time" align="center">time </div>
<script language="javascript">
function time1()
{
var now,n,y,r,h,m,s;
now=new Date();
n = now.getYear();
y = now.getMonth()+1;
r = now.getDate();
h = now.getHours();
m =now.getMinutes();
s = now.getSeconds();
if(y <10) y="0"+y;
if(r <10) r="0"+r;
if(h <10) h="0"+h;
if(m <10) m="0"+m;
if(s <10) s="0"+s;
document.getElementById("time").innerHTML="ÏÖÔÚʱ¼äÊÇ£º"+ n + "-" + y + "-" + r + " "+ h + ":" + m + ":" + s;
setTimeout("time1();", 1000);
}
time1();
</script> ......
phpÖÐsubstrµÄÓ÷¨Ïê½â
php.netÖйØÓÚsubstrµÄ˵Ã÷ºÜ¼òµ¥:
start
If start is non-negative, the returned string will start at the start 'th position in string , counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth.
If start is negative, the returned string will start at the start 'th character from the end of string .
length
If length is given and is positive, the string returned will contain at most length characters beginning from start (depending on the length of string ). If string is less than or equal to start characters long, FALSE will be returned.
If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned.
ÏÂÃæ£¬ÎÒÏêϸ×ܽáһϹØÓÚsubstrµÄÏà¹ØÓ÷¨£º
ÔÐÍ£ºstring substr ( string $stri ......
ÎÒÃÇʹÓÃGoogleÌṩµÄiframeÈÃjspÒ³ÃæÇ¶Èëµ½flexÖÐ
Ê×ÏÈ£¬Çëµ½http://code.google.com/p/flex-iframe/ÏÂÔØiframe µÄswc°ü
µÚ¶þ²½£¬°Ñswc°ü·ÅÈëflex_libsÖУ¬Èç¹û²»ÊÇwebÏîÄ¿¾Í·ÅÈëlibÏÂ
µÚÈý²½£¬´´½¨Ò»¸ömxmlÎļþ
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:code="http://code.google.com/p/flex-iframe/" width="100%" height="100%">
<mx:HDividedBox x="0" y="10" width="100%" height="100%">
<mx:Panel width="30%" height="100%" layout="absolute">
<code:IFrame id="frm2" source="/flexPage/import.jsp" height="100%" width="100%"/>
</mx:Panel>
<mx:Panel width="70%" height="100%" layout="absolute">
<code:IFrame id="frm" source="/flexPage/wnl.html" height="100%" width="100%"/>
</mx:Panel>
</mx:HDividedBox>
</mx:Application>
ÔËÐзþÎñÆ÷£¬¸ã¶¨¡£¡£¡£¡£
×¢Ò⣺j ......
×ÜÌåÀ´Ëµ£¬ÓÐÒÔÏÂÈýµã²»Í¬£º
1.getAttributeÊÇÈ¡µÃjspÖÐ ÓÃsetAttribute設¶¨µÄattribute¡£
2.parameterµÃµ½µÄÊÇstring£»attributeµÃµ½µÄÊÇobject¡£
3.request.getParameter()·½·¨´«µÝµÄÊý¾Ý£¬»á´ÓWeb¿Í»§¶Ë´«µ½Web·þÎñÆ÷¶Ë£¬´ú±íHTTPÇëÇóÊý¾Ý£»request.setAttribute()ºÍgetAttribute()·½·¨´«µÝµÄÊý¾ÝÖ»»á´æÔÚÓÚWebÈÝÆ÷ÄÚ²¿£¬ÔÚ¾ßÓÐת·¢¹ØÏµµÄWeb×é¼þÖ®¼ä¹²Ïí¡£¼´request.getAttribute()·½·¨·µ»Ørequest·¶Î§ÄÚ´æÔڵĶÔÏ󣬶ørequest.getParameter()·½·¨ÊÇ»ñÈ¡httpÌá½»¹ýÀ´µÄÊý¾Ý¡£
JSPÖÐgetParameterÓëgetAttributeÓкÎÇø±ð£¿
——˵ʵ»°£¬Õâ¸öÎÊÌâµ±³õÎÒÒ²À§»óºÜ¾Ã£¬ÎÒÒ²ÖªµÀÔõôÓ㬿ÉÊǵ½µ×ÓÐÊ²Ã´Çø±ð£¬ÎÒÒ²²»ÊǺÜÇå³þ£¬ºóÀ´ÕÒÁ˺ܶà×ÊÁϲÅÃ÷°×¡£×òÌìÓÖÓÐһλÅóÓÑÎÊÎÒÕâ¸öÎÊÌ⣬ÏëÎÒµ±³õͬÑùÒ²À§»ó¹ý£¬ÓÚÊÇÎҾͰÑÕâ¸öÎÊÌâÌù³öÀ´£¬ÈÃͬÑùÀ§»óµÄÅóÓѽâ»ó¡£
——getParameterµÃµ½µÄ¶¼ÊÇStringÀàÐ͵ġ£»òÕßÊÇhttp://a.jsp?id=123ÖеÄ123£¬»òÕßÊÇij¸ö±íµ¥Ìá½»¹ýÈ¥µÄÊý¾Ý¡£
——getAttributeÔò¿ÉÒÔÊǶÔÏó¡£
——getParameter()ÊÇ»ñÈ¡POST/GET´«µÝµÄ²ÎÊýÖµ£»
&m ......
×ªÔØ×Ô http://smallq.javaeye.com/blog/391945
code.jsp
Java´úÂë
<%@ page autoFlush="false" contentType="text/html; charset=GBK"
import="java.util.*,java.io.*,java.awt.*,javax.imageio.*,java.awt.image.*,com.sun.image.codec.jpeg.*,java.util.*"%>
<%!Color getRundColor(int x, int y) {
Random random = new Random();
//ÅжÏsRGB ·ÖÁ¿
if (x > 225)
x = 225;
if (y > 225)
y = 225;
//Éú³É0.0-1.0Ö®¼äµÄÑÕɫֵ
int red = x + random.nextInt(y - x); //ºìɫɫֵ
int green = x + random.nextInt(y - x);&n ......