gpt4 book ai didi

jquery - 表单标签自动关闭

转载 作者:太空宇宙 更新时间:2023-11-03 21:34:50 25 4
gpt4 key购买 nike

我遇到一个表单标签自动关闭的问题。

我想弄清楚到底是什么导致了这个问题。表单标签内的任何内容都会在之后添加。我正在使用 netsuite,这就是为什么这些元素在表中,而且调试起来也有点困难。这是该网站的链接。

这是(部分)在浏览器上生成的内容

>   <div class="col-xs-8"> 
> <div class="oos-button"></div>
> <form method="get" id="add-to-cart-form" role="form" action="/app/site/backend/additemtocart.nl"></form>


<!-- MODAL --> etc...

但是模态代码应该放在表单内部,这就是我的编码方式。

<form method="get" id="add-to-cart-form" role="form" action="/app/site/backend/additemtocart.nl">

<!-- MODAL -->
<div id="<%=getCurrentAttribute('item','itemID')%>" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
<div class="modal-dialog">
<div class="modal-content" style="padding:15px 15px; " >
<h2 class="page-title serif text-center "><@= meal.storedisplayname @></h2>
<div id="product-image" class="img-rounded">
<img src="<@=meal.storedisplaythumbnail @>" class="img-responsive center" alt="">
<br />
<p><strong> <@= meal.storedisplayname @></strong>: added to cart</p>
<label style="color:#7b9738"> Price: $<@= meal.onlineprice @></label>
<hr / >
<hr / >
<div class="text-center">
<button type="button" class="btn btn-info center" data-dismiss="modal">Continue Shopping</button>
<a href="<%=getCartUrl()%>">
<button type="button" class="btn btn-info center">Checkout ></button>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- END MODAL-->
<%= getCurrentAttribute('item','addtocartitemid')%>
<input type="text" class="qty form-control" name="qty" placeholder="Qty" value="1" />
<input type="hidden" name="showcart" value="T" />
<button type="submit" class="btn btn-info btn-block">Add to Cart</button>
</form>

最佳答案

有些浏览器需要 <form>对象在同一个父对象中打开和关闭。在您的情况下,您在 <tr> 中打开一个表单然后在相邻的 <tr> 内关闭它.如果您更正该表格,它可能会解决您的其他问题。

不确定源文件中的位置,但在您发送的 URL 处生成的输出的第 242-257 行。

<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr class='portletHandle' id='handle_itemMainPortlet' >
<td width='100%' height=0 align='left' valign='top'>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td width=0 height=0 align='left' valign='top' style='display:none'>
<form method='post' name='form0' id='form0' action='/s.nl'>
<input type='hidden' name='c' value='3374347'>
<input type='hidden' name='n' value='1'>
<input type='hidden' name='sc' value='39'>
<input type='hidden' name='category' value='13945'>
<input type='hidden' name='id' value=''>
<input type='hidden' name='it' value='A'>
<input type='hidden' name='vid' value='RHCpZYbgAWoCAF5X'>
<input type='hidden' name='ck' value='RHCpZYbgAVkCAEOd'>
<input type='hidden' name='cktime' value='123014'>
<input type='hidden' name='cart' value='-1'>

</td>
</tr>
<tr>
</form>

应该是:

<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr class='portletHandle' id='handle_itemMainPortlet' >
<td width='100%' height=0 align='left' valign='top'>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td width=0 height=0 align='left' valign='top' style='display:none'>
<form method='post' name='form0' id='form0' action='/s.nl'>
<input type='hidden' name='c' value='3374347'>
<input type='hidden' name='n' value='1'>
<input type='hidden' name='sc' value='39'>
<input type='hidden' name='category' value='13945'>
<input type='hidden' name='id' value=''>
<input type='hidden' name='it' value='A'>
<input type='hidden' name='vid' value='RHCpZYbgAWoCAF5X'>
<input type='hidden' name='ck' value='RHCpZYbgAVkCAEOd'>
<input type='hidden' name='cktime' value='123014'>
<input type='hidden' name='cart' value='-1'>
<!-- Move here: --></form>
</td>
</tr>
<tr>

关于jquery - 表单标签自动关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27238542/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com