⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form.xtp

📁 解压在c盘
💻 XTP
字号:
<s1 title="Forms"><p>Forms are, of course, the most important way of getting informationfrom the customer of a web site.  In this section, we'll just create asimple color survey and print the results back to the user.</p><p>First, create the entry form.  Our HTML form will send its answersto form.jsp for processing.</p><p>For this example, the <code/name="name"/> and <code/name="color"/>are very important.  You will use these keys to extract the user'sresponses.</p><example title='form.html'>&lt;form action="form.jsp" method="get"&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Name&lt;/b&gt;    &lt;td&gt;&lt;input type="text" name="name"&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Favorite color&lt;/b&gt;    &lt;td&gt;&lt;input type="text" name="color"&gt;&lt;/table&gt;&lt;input type="submit" value="Send"&gt;&lt;/form&gt;</example><p>Resin keeps the browser request information in the<code/request/> object.  The <code/request/> object contains theenvironment variables you may be familiar with from CGI programming.For example, it has the browser type, any HTTP headers, the servername and the browser IP address.</p><p>You can get form values using <code/request.getParameter/> object.</p><p>The following JSP script will extract the form values and print themright back to the user.</p><example title='form.jsp'>Name: &lt;%= request.getParameter("name") %&gt; &lt;br&gt;Color: &lt;%= request.getParameter("color") %&gt; </example></s1>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -