小编nam*_*tha的帖子

document.getElementById("test").style.display ="hidden"无法正常工作

当我点击提交按钮时,我想隐藏我的表单.我的代码如下:

<script type="text/javascript">
    function hide() {
        document.getElementById("test").style.display = "hidden";
    }
</script>
<form method="post" id="test">
    <table width="60%" border="0" cellspacing="2" cellpadding="2">
        <tr style="background:url(../images/nav.png) repeat-x; color:#fff; font-weight:bold"
        align="center">
            <td>Ample Id</td>
            <td>Find</td>
        </tr>
        <tr align="center" bgcolor="#E8F8FF" style="color:#006">
            <td>
                <input type="text" name="ampid" id="ampid" value="<?php echo $_POST['ampid'];?>"
                />
            </td>
            <td>
                <input type="image" src="../images/btnFind.png" id="find" name="find"
                onclick="javascript:hide();" />
            </td>
        </tr>
    </table>
</form>
Run Code Online (Sandbox Code Playgroud)

但是,当我点击"查找"按钮时,该特定表单未被隐藏.

html javascript

13
推荐指数
4
解决办法
19万
查看次数

使用tcpdf生成pdf下载

我无法生成pdf下载,我的代码如下,任何人都可以告诉我这段代码有什么问题.

include 'tcpdf.php';
$pdf = new TCPDF();
$pdf->AddPage('P', 'A4');
$html = '<html>
<head></head>
<body><table border="1">
<tr><th>name</th>
<th>company</th></tr>
<tr>
<td>hello</td>
<td>xx technologies</td>
</tr>
</table>
</body>
</html>';

$pdf->writeHTML($html, true, false, true, false, '');

$pdf->Output();
?>
Run Code Online (Sandbox Code Playgroud)

php tcpdf

6
推荐指数
1
解决办法
3万
查看次数

标签 统计

html ×1

javascript ×1

php ×1

tcpdf ×1