我能否得到一个添加/删除动态文本框的框架,然后发布附加的结果。
我希望它看起来像这样:
[空文本框][添加按钮]
一旦将 Value1 放入文本框中并单击添加,它将显示:
[空文本框][添加按钮]
[Value1][删除按钮]
添加完所有内容后,我希望将其发布并允许人们删除任何添加的文本框。
我一直在寻找示例,但找不到以这种方式工作的示例。
<form method="post" id="multi" action="process.php">
<label for="cname">Company Name: <span class="required">*</span></label>
<input type="text" size="30px" id="cname" name="cname" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['cname'] : '' ?>" placeholder="The Rainbow Kingdom" required autofocus />
<label for="name">Contact Name: <span class="required">*</span></label>
<input type="text" size="30px"id="name" name="name" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['name'] : '' ?>" placeholder="John Doe" required autofocus />
<label for="email">Email Address: <span class="required">*</span></label>
<input type="email" size="50px" id="email" name="email" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['email'] : '' ?>" placeholder="johndoe@example.com" required />
<label for="telephone">Telephone: </label>
<input size="9px" placeholder="1112223333" autofocus maxlength="9" type="tel" id="telephone" name="telephone" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['telephone'] : '' ?>" />
<div>
<label>Tag</label><input class="tag" type="text" name="" type="text" />
<div id="content" ></div>
</div>
<label for="message">Message: <span class="required">*</span></label>
<textarea id="message" name="message" placeholder="Your message must be greater than 20 characters" required data-minlength="20"><?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['message'] : '' ?></textarea>
<p id="req-field-desc">
<span class="required">*</span> indicates a required field
</p>
<span id="loading"></span>
<input type="submit" value="Submit!" id="submit-button" />
</form>