use CGI (:standard); $ref = "x.cgi"; a({href=>$ref}, "yy") textfield({name=>"yy", size=>5}) password({name=>"yy", size=>5}) textarea({name=>"yy", cols=>5, rows=>2}) submit({value=>"yy"}) button( {name=>"xx", value=>"yy", onclick=>"submit()", } ) %labels = (0=>'a',1=>'q',2=>'x'); popup_menu( { name=>"xx", values=>[0..2], labels=>%labels, size=>4, } ) @a = ('xx','yy','zz'); radio_group( { name=>'nn', values=> @a, default=>'_', linebreak=>1, } ) %labels = ('xx'=>'L1','yy'=>'L2'); @a = keys( %labels ); checkbox_group( { name=>'nn', values=> @a, labels=> %labels, } ) table( Tr( [ td(['a','b']), td(['x','y']), ] ) )
|
# The Perl/CGI functions have the # additional property of "stability" # when used in reentrant forms. # The values of the HTML elements are # set according to the incoming # parameter values for those elements. # The versions below are not stable. $ref = "x.php"; <a href="<?php echo $ref?>">yy</a> <input type=text name=yy size=5> <input type=password name=yy size=5> <textarea name=yy cols=5 rows=2>
</textarea> <input type="submit" value=yy> <input type="button" name="xx" value="yy" onclick="submit()"> <select name="xx" size="4"> <?php $labels = array(0=>'a',1=>'q',2=>'x'); foreach (range(0,2) as $_) echo "<option value='$_'>", $labels[$_]; ?>
</select> $a = array('xx','yy','zz'); foreach ($a as $_) echo "<input type=radio name=nn value='$_'>$_<br>"; $labels = array('xx'=>'L1','yy'=>'L2'); foreach (array_keys($labels) as $_) echo "<input type=checkbox name=nn value='$_'>", $labels[$_]; <table> <tr> <td>a</td><td>b</td>
</tr> <tr> <td>x</td><td>y</td> </tr> </table>
|
as title 🙂
請問一下 PowerOp大大..
archive.org 要如何找到這篇文章呀???
我試一下找不到說, 能否請大大教小弟一下..
http://www.archive.org/
或者
http://www.archive.org/web/web.php
看到一個"Wayback Machine"的圖示嗎?
在後面那個http://方框裡面,輸入妳要找的網址,
例如http://www.cs.wcupa.edu/~rkline/perl2php/
點選旁邊的"Take me back"按鈕,應該會看到一堆。
ps:妳的blog雖然有RSS,可是comments沒有,所以我差點漏掉>_
方便的話,下次順便寄封信提醒我?
又,叫我PowerOp就好啦。
為什麼有perl...又要出來一個php?
php...比perl強嗎?
看不出來耶...
@.@a.... 並沒有什麼比什麼強的, 只有適不適合, 熟悉度等問題而已吧~ 🙂
補充一下, 統一把筆記做在這 ^^
php -> continue() = perl -> next()
php -> break() = perl-> last()
哈, 感恩, 我不會砍掉的~ 😛
@.@ 應該會看到