圣诞节祝福页面,可任意添名字改名字的页面

本文介绍了一个简单的表单制作示例,展示了如何通过HTML创建一个包含文本输入字段的表单,并使用ASP来接收和显示这些字段的数据。

一、首先在第一页制作--制作表单用来传递数据,如下:

<form action="hd_zf.asp" method="get" name="form1" id="form1">
  <table width="535" border="0" align="center" cellpadding="5" cellspacing="0" class="t1">
    <tr>
      <td colspan="3" class="STYLE24">马上输入您的名字制作属于自己的个性祝福</td>
    </tr>
    <tr>
      <td align="right" class="STYLE7 STYLE33">你的名你的名字</td>
      <td width="187"><input name="your" type="text" id="your" /></td>
      <td width="50">&nbsp;</td>
    </tr>
    <tr>
      <td align="right"><span class="STYLE1">她的名字</span></td>
      <td><input name="her" type="text" id="her" /></td>
      <td><input type="submit" name="Submit" value="提交" /></td>
    </tr>
  </table>
</form>

图例1:


图例2:


二、在第二页,制作接收数据的页:

  <%
dim fher
fher=Request.QueryString("her")
If fher<>"" Then
      Response.Write("" & fher & "")
End If
%>

  <%
dim fyour
fyour=Request.QueryString("your")
If fher<>"" Then
      Response.Write("" & fyour & "")
End If
%>

如下图



当然可以。如果你想创建一个简单的HTML圣诞祝福卡片,你可以开始编写这样的代码: ```html <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>个性化圣诞节祝福</title> <style> body { background-color: #f2e0d5; font-family: Arial, sans-serif; text-align: center; padding-top: 100px; } .card-container { width: 400px; margin: 0 auto; border: 2px solid #c67a49; padding: 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } h1 { color: #c67a49; font-size: 36px; } p { color: #333; font-size: 24px; } input[type=text] { display: block; margin-bottom: 20px; padding: 10px; border: 1px solid #ccc; width: 100%; } button { background-color: #c67a49; color: white; border: none; cursor: pointer; padding: 10px 20px; font-size: 16px; } button:hover { background-color: #b3673d; } </style> </head> <body> <div class="card-container"> <h1 id="greeting">亲爱的【输入姓名】:</h1> <p>祝你圣诞快乐,愿平安与爱充满你的每一个角落。</p> <input type="text" id="nameInput" placeholder="请输入你的朋友的名字..."> <button onclick="changeGreeting()">发送祝福</button> </div> <script> function changeGreeting() { var name = document.getElementById('nameInput').value; document.getElementById('greeting').innerText = '亲爱的' + name + ','; } </script> </body> </html> ``` 在这个例子中,用户可以在浏览器中填写朋友的名字,点击“发送祝福”按钮时,页面上会显示个性化的问候。你可以将这个HTML文件发给你的朋友,并让他们在线填写。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值