【问题标题】:HTML generated by DreamweaverDreamweaver 生成的 HTML
【发布时间】:2023-03-15 23:58:01
【问题描述】:

当我在下面运行以下代码时,它可以在 Dreamweaver 中运行,但是当我在网络浏览器中查看它时,没有任何显示。

代码是

    <table cellpadding="5" cellspacing="1">
<tr>
  <td align="center">

    <form action="search.php" method="get">

<table><tr><td>
<input type="text" name="query" id="query" size="40" value="<?  print quote_replace($query);?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500">    
</div> 
<td>
<input type="submit" value="Search!">
</td></tr></table>

当我在 chrome 中查看源代码时,它只会加载

    <table cellpadding="5" cellspacing="1">

<tr>

  <td align="center">



    <form action="search.php" method="get">



<table><tr><td>

【问题讨论】:

  • 我认为您的帖子有误。 action="include...的部分是在form标签里面还是外面?
  • 孤儿?在表格单元格中关闭 DIV 也
  • 我猜它在这行代码上抛出了一个错误:&lt;? print quote_replace($query);?&gt;。尝试使用&lt;?php ?&gt; 标签而不是简写。
  • 您的 php 短标签也不准确。请务必更改为 &lt;?php ... ?&gt;
  • @thedaian .. 我输了决斗。

标签: html xhtml


【解决方案1】:

与您的主机核实,看看他们是否启用了&lt;? 标签。默认情况下未打开。如果不是,它可能会给 Chrome 带来很大的痛苦。

【讨论】:

    【解决方案2】:

    检查你的语法。您粘贴的内容无效。看起来您关闭了表单两次,或者您在“获取”区域中有一组额外的引号。

    附带说明,我建议删除与显示相关的 HTML 属性以支持 CSS。这将有助于明确区分功能和外观。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-23
      • 1970-01-01
      • 2013-07-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多