这是我的JS:
function display(action, id) { if
(action == 'show') {
document.getElementById("explanation"+id).style.display
= "block"; document.getElementById("link"+id).href=
"javascript:display('hide', "+id+")";
document.getElementById("link"+id).innerHTML
= "Close"; }
if (action == 'hide') {
document.getElementById("explanation"+id).style.display
= "none"; document.getElementById("link"+id).href=
"javascript:display('show', "+id+")";
document.getElementById("link"+id).innerHTML
= "Explain"; } }
和HTML:
method="post"
enctype="multipart/form-data">
{assign var="clone" value="0"}
{section name=another loop=$dealImageTest}
{assign var="cloneTemp" value=$clone++}
width="62" height="40" /> id="link{$cloneTemp}" href="javascript:display('hide', {$cloneTemp})">Remove value="{$dealImageTest[another]}"> |
{/section}
当我单击“删除”按钮时,图像正在隐藏。但是当我提交表单时,我得到了隐藏类型的值。
但是根据DIV,如果样式是隐藏的,它将不会传递任何值。
如何才能解决这个问题。任何想法都将是有益的和伟大的。提前谢谢