【问题标题】:The code snipet from a real Web application - explation needed来自真实 Web 应用程序的代码片段 - 需要说明
【发布时间】:2011-12-19 12:11:04
【问题描述】:

从事逆向工程我今天发现了以下片段:

<script id="idea" type="text/x-jqote-template">
    <![CDATA[
    <li data-idea_id="<*= this.id *>" class="voted">
      <div class="vote_panel">
        <div class="vote_count"><*= this.votes_count *></div>
        <span class="vote_action vote">You've already voted</span>
      </div>  
      <div class="idea_details">
        <h4 class="title"><*= this.title *> <a href='#' class='toggle_description more details'>Details</a></h4>
        <div class="description_metadata_pane" style="display: none;">
          <p class="description"><*= this.description *></p>
          <p class="metadata">- <*= this.name *> on <*= this.created_at *></p>
      </div>
    </li>
    ]]>
</script>

有人能解释一下这是如何工作的吗?数据来自哪里(服务器端或客户端)?

【问题讨论】:

    标签: css web-applications client-side web


    【解决方案1】:

    这似乎是一个名为jQote2 的客户端模板引擎(我知道,很疯狂)。

    它加载&lt;script&gt;标签的内容并使用jQuery在客户端渲染它。

    【讨论】:

      猜你喜欢
      • 2012-08-12
      • 2020-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多