依睛(IT blog) 我回来了,PHP<-->C/C++ LINUX

笨鸟

统计

积分与排名

友情连接

最新评论

HTML CSP 提交用法

str.csp文件

<html>
<body>
<form method="post" action="result.csp">
<!-----------------------------------------
name="inputbox1" value="Hello world"

name = value+name & name=value+value
---------------------------------------->

 Input something: <input type="text" name="inputbox1" value="Hello world" size="25"><BR>

 <p>
 <textarea name="textarea1" value="" cols="45" rows="3" >Input some lines here</textarea>

 <p>
 select one radio:
 1. <input type="radio" id="radiobox" name="choices" value="1">
 2. <input type="radio"  name="choices" value="2" checked>
 3. <input type="radio"  name="choices" value="3">

 <br>
 check following:
 1. <input type="checkbox" id="checkbox" name="checkbox1" value="1">
 2. <input type="checkbox"  name="checkbox2" value="2">
 3. <input type="checkbox"  name="checkbox3" value="3" checked>

 <p>Select more than one(default 2):
 <select name="selone" >
  <option value="1">the 1st</option>
  <option value="2" selected>the second</option>
  <option value="3">the third</option>
  <option value="4">the forth</option>
 </select>

 <p>
 Select one (default 3):<br>
 <select name="selmore" size=4>
  <option value="1">this is the 1st</option>
  <option value="2" selected>this is the second</option>
  <option value="3">this is the third</option>
  <option value="4">this is the forth</option>
 </select>

 <p>
 
 <hr>
 <input type="submit" name="testit" value="submit test test case">
 <input type="hidden" name="submit_flags" value="yes">
</form>ss
</table>
</body>
</html>
============================================================
result.csp文件.
<HTML>
<TITLE>CSP/eybuild sample result</TITLE>
<HEAD>
<h2>Post form result:</h3>


<% @include <stdlib.h> %>

<!--------------------------------
{% @include <stdlib.h> %}
--------------------------------->


<!--------------------------------
value="<% =G("inputbox1")
获取值 G("inputbox1")

G("choices")
--------------------------------->
 Input something: <input type="text" value="<% =G("inputbox1") %>" size="25"><BR>

 <p>
 <textarea name= value="" cols="45" rows="3" ><% =G("textarea1") %></textarea><br>


 1. <% RADIO_BOX("choices", "1", G("choices"), NULL) %> 
 2. <% RADIO_BOX("choices", "2", G("choices"), NULL) %> 
 3. <% RADIO_BOX("choices", "3", G("choices"), NULL) %> 

 <br>
 check following:
 1. <% CHECK_BOX2("checkbox1", "1", atoi(G("checkbox1")), NULL) %>
 2. <% CHECK_BOX2("checkbox2", "2", atoi(G("checkbox2")), NULL) %>
 3. <% CHECK_BOX2("checkbox3", "3", atoi(G("checkbox3")), NULL) %>

 <p>
 Select more than one(default 3):
 <% SELECT_BEGIN("selone", G("selone"), NULL) %>
  <% OPTIONS_ADD("1", "the 1st") %>
  <% OPTIONS_ADD("2", "the second") %>
  <% OPTIONS_ADD("3", "the third") %>
  <% OPTIONS_ADD("4", "the forth") %>
 <% SELECT_END() %>

 <p>
 Select one (default 2):<br>
 <% SELECT_BEGIN2("selmore", atoi(G("selmore")), "size=4") %>
  <% OPTIONS_ADD2(1, "this is the 1st") %>
  <% OPTIONS_ADD2(2, "this is the second") %>
  <% OPTIONS_ADD2(3, "this is the third") %>
  <% OPTIONS_ADD2(4, "this is the forth") %>
 <% SELECT_END2() %>
</pre>
<p>
[ <A href="str.csp">Return</a> ]

</body>
</HTML>

posted on 2008-12-27 16:11 向左向右走 阅读(454) 评论(0)  编辑 收藏 引用 所属分类: 看看就行的资料

只有注册用户登录后才能发表评论。