| 提交後返回地址變數:ecmsfrom |
ecmsfrom變數值有三種方式: 1、如果不設定則返回系統預設的地址; 2、如果值為9,那麼返回的是提交地址,系統自動識別; 3、如果設定除了9以外其它值,將返回變數值的地址。 |
<input type="hidden" name="ecmsfrom" value="http://www.phome.net"> |
| |
變數名 |
例子 |
| 登陸表單提交地址 |
/e/enews/index.php |
<form name="login" method="post" action="/e/enews/index.php"> |
| 使用者名稱輸入框變數 |
username |
<input name="username" type="text"> |
| 密碼輸入框變數 |
password |
<input name="password" type="password"> |
| 登陸資訊儲存時間 |
lifetime |
單位為秒,如:<input type="radio" name="lifetime" value="3600">一小時 |
| 驗證碼輸入框變數 |
key |
<input name="key" type="text" size="6"> |
| 顯示驗證碼 |
/e/ShowKey?ecms |
<img src="/e/ShowKey?ecms"> |
| 登陸事件變數 |
enews |
<input type="hidden" name="enews" value="login"> |
| 提交後返回地址變數:ecmsfrom |
ecmsfrom變數值有三種方式: 1、如果不設定則返回系統預設的地址; 2、如果值為9,那麼返回的是提交地址,系統自動識別; 3、如果設定除了9以外其它值,將返回變數值的地址。 |
<input type="hidden" name="ecmsfrom" value="http://www.phome.net"> |
| 返回提示資訊方式:prtype |
不設定為預設(e/message); 1為彈出對話方塊方式(alert)。 |
<input type="hidden" name="prtype" value="1"> |
| 一、表單範例1: |
| 1、用Dreamweaver製作好表單: |
設計檢視:
代碼模式下的表單代碼
<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#8CBDEF"> <form name="login" method="post" action="/e/enews/index.php"> <tr> <td height="25" colspan="2"> <div align="center"><strong><font color="#FFFFFF">會員登陸</font></strong></div> </td> </tr> <tr bgcolor="#FFFFFF"> <td width="97" height="25">使用者帳號</td> <td width="188" height="25"> <input name="username" type="text"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="25">使用者密碼</td> <td height="25"> <input name="password" type="password"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="25">儲存時間</td> <td height="25"> <select name="lifetime"> <option value="0">不儲存</option> <option value="3600">一小時</option> <option value="86400">一天</option> <option value="2592000">一個月</option> <option value="315360000">永久</option> </select> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="25">驗證碼</td> <td height="25"> <input name="key" type="text" size="6"> <img src="/e/ShowKey?ecms"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="25"> </td> <td height="25"> <input type="submit" name="Submit" value="登陸"> <input type="button" name="Submit" value="註冊" onclick="self.location.href='/e/member/register/';"> <input name="enews" type="hidden" value="login"></td> </tr> </form> </table> |
|
| 2、最終登陸表單顯示效果為: |
|
| 1、如果後台關閉登陸需要驗證碼,則不用加key驗證碼參數。 |
http://www.phome.net/doc/ecmsedu/base/mbzz/html/loginform.html