代码如下:
<form id="form1" name="form1" method="post" action="index.php
src=325&item=iframe&action=save&t=&lc=2" onsubmit="return check();" style="width:433px;height:301px">
<table width="433" height="301" cellpadding="0" cellspacing="0" style="background-image:url(images/sub_mi_expo_05.jpg); width:433px; height:301px;">
<tr>
<td height="70"></td>
</tr>
<tr>
<td width="105" align="right" height="40" class="font_color">您的姓名:</td>
<td align="left" width="102" style="width:102px; overflow:hidden;"><input type="text" id="name" name="name1" maxlength="8"/></td>
<td align="right" width="50" class="font_color" style="width:50px; overflow:hidden;">手机:</td>
<td align="left" width="176"><input type="text" id="phone" name="phone1" maxlength="11"/></td>
</tr>
<tr>
<td width="105" align="right" height="45" class="font_color">收票地址:</td>
<td colspan="3"><input type="text" id="address" name="address" maxlength="100" /></td>
</tr>
<tr>
<td width="105" align="right" height="35" class="font_color">快递时间:</td>
<td colspan="3"><input type="radio" name="express" value="3" checked="checked"/>任何一天 <input type="radio" name="express" value="1"/>工作日 <input type="radio" name="express" value="2"/>双休日 </td>
</tr>
<tr>
<td height="55"></td>
<td colspan="3"><p style="width:154px; text-align:center; float:left; height:37px; font-size:12px; color:#FF6666; overflow:hidden; line-height:34px; background-image:url(images/new_cdbm_12.jpg); background-repeat:no-repeat;">已有<font style="font-size:22px; color:#FF0000; font-family:Arial;"></font>人报名</p>
<p style="width:127px; height:37px;float:left;"><input type="submit" value="" id="order_sh" style=" cursor:pointer;background-image:url(images/TIJ_EXPO_NEW_06.jpg); border:0;width:127px; height:37px;" /></p></td>
</tr>
</table>
麻烦大神能写代码的写一下代码!谢谢。
htmlä¸è·å表åæ°æ®ççæ¹æ³ä¸è¬æ两ç§ï¼ä¸ä¸ªæ¯ä½¿ç¨form表åçactionå±æ§å°è¡¨åçæ°æ®æ交ç»åå°ï¼å¦å¤ä¸ç§å°±æ¯ä½¿ç¨JavaScriptæ¹æ³è·å表åçæ°æ®ï¼ç¶åéè¿ajaxä¼ éç»åå°ã
å·¥å ·åæï¼ç¼è¾å¨ãæµè§å¨
ä¸ã使ç¨è¡¨åçæ¹æ³æ交æ°æ®
1ãå©ç¨form表åçactionå±æ§æ¥è·å表åçæ°æ®å¹¶æ交ï¼ä»£ç å¦ä¸ï¼
<form action="form_action.php" method="get">2ã以ä¸ä»£ç ä¸methodæå®æ交æ°æ®çæ¹æ³ä¸ºgetï¼actionçå¼æ¯è¡¨åæ°æ®æ交çå°åã
äºã使ç¨JavaScriptæ¹æ³æ¥è·å表åçæ°æ®çæ¹æ³
1ãå¯ä»¥ä½¿ç¨JavaScriptçéæ©å¨éæ©è¡¨åçå ç´ å¹¶è·åå ¶è¾å ¥çæ°æ®ï¼ä»£ç å¦ä¸ï¼
<form action="form_action.php" method="get">2ãå ¶ä¸$('#bt1').val()å°±æ¯è·åinputè¾å ¥å 容çå¼
document.getElementById('b').value
或者
form1.a.value
在页面间传递,<script>function goURL(theform){ var gourl = "456.html";
gourl +="?p="+theform.username.value+"|"+theform.email.value; theform.action = gourl; return true;
}</script><form method=get onsubnit="return goURL(this);
"><input type=text name=username><input type=text name=email><input type=button value=提交
onclick="goURL(this.form)"></form> 在456.html页面用脚本叫URL问号后面的值分割后,再用"|"分割就得到username和email<script>function init(){ var url= document.location.href.split("?")
temp =url.split("|");
alert("UserName="+temp[0]+"\n"+"Email="+temp[1]); }</script><body onload=init()> </body>
只需获取 您的姓名:手机:收票地址:就可以了值存在文本里
本回答被提问者采纳