首页 \ 问答 \ 使用jquery在表单字段中迭代(iterate in form fields using jquery)

使用jquery在表单字段中迭代(iterate in form fields using jquery)

假设我有表格,它有很多表格字段。 我如何在所有表单字段中迭代并检查输入类型并收集值

我的表格字段是

<form id="form1" runat="server">
<div>
    <fieldset>
        <ol>
            <li>
                <label class="left">
                    First Name
                </label>
                <input type="text" id="FirstName" runat="server" /></li>
            <li>
                <label class="left">
                    Last Name
                </label>
                <input type="text" id="LastName" runat="server" /></li>
            <li>
                <label class="left">
                    Email
                </label>
                <input type="text" id="Email" runat="server" /></li>
            <li>
                <label class="left">
                    Phone
                </label>
                <input type="text" id="Phone" runat="server" /></li>
            <li>
                <label class="left">
                    Contact Method
                </label>
                <span class="checkBoxGroup">
                    <input type="checkbox" id="ReqEmail" runat="server" /><label>Email</label>
                    <input type="checkbox" id="ReqMail" runat="server" /><label>Mail</label>
                    <input type="checkbox" id="ReqPhone" runat="server" /><label>Phone</label>
                    <input type="checkbox" id="ReqNoContact" runat="server" /><label>No Contact</label>
                </span></li>
            <li>
                <label class="left">
                    New Letter Type
                </label>
                <span class="myGroupRandom" >
                    <input type="checkbox" id="Checkbox1" runat="server" /><label>Company News</label>
                    <input type="checkbox" id="Checkbox2" runat="server" /><label>Press Releases</label>
                    <input type="checkbox" id="Checkbox3" runat="server" /><label>Deals</label>
                    <input type="checkbox" id="Checkbox4" runat="server" /><label>Employement</label>
                </span></li>
            <li>
                <input type="submit" id="Submit" value="Submit" /></li>
        </ol>
    </fieldset>
</div>
</form>

请指导谢谢


suppose i have form and it has many form fields. how can i iterate with in all form fields and check the input type and collect the value

my form fields are

<form id="form1" runat="server">
<div>
    <fieldset>
        <ol>
            <li>
                <label class="left">
                    First Name
                </label>
                <input type="text" id="FirstName" runat="server" /></li>
            <li>
                <label class="left">
                    Last Name
                </label>
                <input type="text" id="LastName" runat="server" /></li>
            <li>
                <label class="left">
                    Email
                </label>
                <input type="text" id="Email" runat="server" /></li>
            <li>
                <label class="left">
                    Phone
                </label>
                <input type="text" id="Phone" runat="server" /></li>
            <li>
                <label class="left">
                    Contact Method
                </label>
                <span class="checkBoxGroup">
                    <input type="checkbox" id="ReqEmail" runat="server" /><label>Email</label>
                    <input type="checkbox" id="ReqMail" runat="server" /><label>Mail</label>
                    <input type="checkbox" id="ReqPhone" runat="server" /><label>Phone</label>
                    <input type="checkbox" id="ReqNoContact" runat="server" /><label>No Contact</label>
                </span></li>
            <li>
                <label class="left">
                    New Letter Type
                </label>
                <span class="myGroupRandom" >
                    <input type="checkbox" id="Checkbox1" runat="server" /><label>Company News</label>
                    <input type="checkbox" id="Checkbox2" runat="server" /><label>Press Releases</label>
                    <input type="checkbox" id="Checkbox3" runat="server" /><label>Deals</label>
                    <input type="checkbox" id="Checkbox4" runat="server" /><label>Employement</label>
                </span></li>
            <li>
                <input type="submit" id="Submit" value="Submit" /></li>
        </ol>
    </fieldset>
</div>
</form>

please guide thanks


原文:https://stackoverflow.com/questions/7203691
更新时间:2023-11-17 19:11

最满意答案

我不相信任何定制是可能的。 对于自定义电子邮件,您应该使用Amazon SES。 但是,您需要自己管理取消订阅。


I don't believe any customization is possible. For custom e-mails you should use Amazon SES instead. You would however need to manage unsubscribes yourself.

相关问答

更多
  • 在发送消息后,您无法通过messageID检索消息详细信息,因为没有可用的API调用 。 您需要在发送电子邮件时(通过API或SMTP)存储有关消息的相关详细信息以及SES成功响应中给出的消息ID。 开发人员指南涵盖了检索收件人的类似情况,提到您需要这样做 存储[您自己的]标识符与Amazon SES在接受电子邮件时传递给您的Amazon SES消息ID之间的映射。 亚马逊在SES支持线程中的回答(尽管从2012年开始)也强调了在发送消息时需要记录消息ID。 如果您记录消息ID,则可以使用消息ID来识别退回 ...
  • Android拥有云到设备消息(c2dm),这是谷歌的实验室项目。 这时它是免费的。 我不知道wp7或。 我相信iOS也有自己的系统。 Android has cloud-to-device-messaging (c2dm), which is a labs project by google. At this time it is free. I don't know about wp7 or. I believe iOS has their own system as well.
  • 该行为似乎没有受到这种或那种方式的约束。 complainedRecipients和bouncedRecipients是列表,因此每个通知肯定可以是多个收件人,但是是否涉及多个目标ISP,并且目标ISP的响应时间似乎确定一个通知中可能包含的收件人数。 您可以看到一条消息的多个通知,或者只有一个多个收件人的通知。 此外,值得注意的是,投诉通知收件人有时会通过尽力猜测确定,因为投诉报告可能含糊不清,SES会尝试启发式猜测,在这种情况下: 由于大多数互联网服务提供商会根据投诉通知中的提交投诉的收件人的电子邮件地址 ...
  • 如果您已经构建了本机应用程序 - 也许您可以将通知包装在插件中并在本机脚本中重用它: NativeScript插件 If you have already build the app native - maybe you can wrap the notifications in a plugin and reuse it in native script: NativeScript Plugins
  • 通知格式由Amazon S3生成。 它无法定制。 看到: 启用事件通知 事件消息结构 The notification format is generated by Amazon S3. It cannot be customized. See: Enabling Event Notifications Event Message Structure
  • 提到的预定通知只能在通过Firebase控制台发送消息时完成。 如果您打算实施自己的App Server并使用FCM API发送消息,则必须自行实施计划推送。 (见这里 ) 对于批量推送通知 ,如果您使用FCM主题消息传递,则可以轻松实现此推送通知 。 为了回答你的文章(这基本上是基于观点的),我之前没有真正使用Amazon SNS,但是使用FCM不仅可以使用新功能(与GCM相比),但它也可以作为一个起点供您使用其他服务(实时数据库,分析,身份验证等)。 The mentioned scheduled no ...
  • Okies。 别担心。 我运行了一个测试,我在send函数周围包裹了一个循环,并向自己发送了25,000个推送通知。 不得不关闭我的手机,但最终结果是每秒约13发送或大约30分钟发送25,000。 鉴于网络延迟等变量并且足以指示使用我们将需要添加到软件的各种体系结构,这一点也不错。 Okies. Don't worry. I've run a test where I wrapped a loop around the send function and sent myself 25,000 push no ...
  • 我发现了问题。 由于我使用线程来推送通知,因此执行被推迟了。 看起来Lambda在handleRequest()方法完成后暂停任何线程的执行。 我在使用DynamoDB中的线程更新对象时遇到了同样的问题。 我的建议是仅将Threads用于多任务作业,但保证只有在所有Threads完成后handleRequest()才会到达return语句。 I found the problem. Since I'm using threads to push the notifications the execution ...
  • 这不可能。 将向该主题的所有订阅者发送消息。 您可以为不同类型的订阅(例如,SMS与电子邮件)提供不同版本的消息,但您无法控制哪种类型的订阅者收到消息。 一些替代品: 针对您希望仅向订阅者子集发送通知的情况,保留单独的主题 使用Amazon Pinpoint专门针对具有通知活动的移动用户 This is not possible. All subscribers to the topic will be sent the message. You can provide different versions ...
  • 我不相信任何定制是可能的。 对于自定义电子邮件,您应该使用Amazon SES。 但是,您需要自己管理取消订阅。 I don't believe any customization is possible. For custom e-mails you should use Amazon SES instead. You would however need to manage unsubscribes yourself.

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)