【问题标题】:Enter in source code causes whitespace输入源代码导致空格
【发布时间】:2016-06-04 08:30:28
【问题描述】:

如何去除html源码中Enter字符带来的空白?当我有 内联 asp 代码html 并且我想生成例如这个数字 5 由 Sql 查询,我想在单独的行中编写 Sql。

我应该使用第三语言以及 JavascriptCSS 还是 HTMLASP 中的任何技巧>(或PHP)自己?

示例内联 asp 代码:

<html>
<body>
orders (
<%sql="select count(*) as total from orders"
recordset.open sql,objConnection
response.wrire rs("total")
rs.close
%>
)
</body>
</html>

请运行这个 sn-p:

orders (
5
)

<br>

orders (5)

【问题讨论】:

  • 你用什么来删除空格,或者你想用什么? HTML不会
  • 这正是我的问题。如何删除?
  • 先生是什么语言?你试过了吗?
  • 是什么语言?
  • 我上面已经提到过:用html内联asp代码。我应该使用第三种语言吗? javascript还是动态语言的其他方法?

标签: html asp-classic removing-whitespace


【解决方案1】:

尝试将括号移到 asp 服务器标签旁边以删除空格。

<html>
<body>
orders (<%sql="select count(*) as total from orders"
recordset.open sql,objConnection
response.write rs("total")
rs.close
%>)
</body>
</html>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多