久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='KPYRq'></tfoot>

    1. <i id='KPYRq'><tr id='KPYRq'><dt id='KPYRq'><q id='KPYRq'><span id='KPYRq'><b id='KPYRq'><form id='KPYRq'><ins id='KPYRq'></ins><ul id='KPYRq'></ul><sub id='KPYRq'></sub></form><legend id='KPYRq'></legend><bdo id='KPYRq'><pre id='KPYRq'><center id='KPYRq'></center></pre></bdo></b><th id='KPYRq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KPYRq'><tfoot id='KPYRq'></tfoot><dl id='KPYRq'><fieldset id='KPYRq'></fieldset></dl></div>

      <small id='KPYRq'></small><noframes id='KPYRq'>

        <legend id='KPYRq'><style id='KPYRq'><dir id='KPYRq'><q id='KPYRq'></q></dir></style></legend>
          <bdo id='KPYRq'></bdo><ul id='KPYRq'></ul>

        如何以更好的方式從 ASP 編輯 html?

        How to edit the html from ASP in a better way?(如何以更好的方式從 ASP 編輯 html?)
          <tfoot id='rHp51'></tfoot>
              <bdo id='rHp51'></bdo><ul id='rHp51'></ul>

              • <small id='rHp51'></small><noframes id='rHp51'>

                <i id='rHp51'><tr id='rHp51'><dt id='rHp51'><q id='rHp51'><span id='rHp51'><b id='rHp51'><form id='rHp51'><ins id='rHp51'></ins><ul id='rHp51'></ul><sub id='rHp51'></sub></form><legend id='rHp51'></legend><bdo id='rHp51'><pre id='rHp51'><center id='rHp51'></center></pre></bdo></b><th id='rHp51'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rHp51'><tfoot id='rHp51'></tfoot><dl id='rHp51'><fieldset id='rHp51'></fieldset></dl></div>

                    <tbody id='rHp51'></tbody>
                  <legend id='rHp51'><style id='rHp51'><dir id='rHp51'><q id='rHp51'></q></dir></style></legend>
                  本文介紹了如何以更好的方式從 ASP 編輯 html?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  您好,我有一個需要編輯的 ASP 腳本.實際上我需要重新設置它發送的電子郵件的樣式,所以我需要從中編輯 HTML.

                  Hello I have an ASP script that I need to edit. Actually I need to restyle the email that it sends, so I need to edit the HTML from it.

                  問題是html(來自asp文件)在每一行都有

                  The problem is the html (from the asp file) has on every row

                  HTML = HTML & =" 
                  

                  在其中(加上其他一些更改).我需要從該 ASP 中獲取 HTML 代碼,去掉開頭的 html = html 部分,編輯雙 "" 并將它們轉換為單個 " (我需要一一做,因為變量中也有引號).

                  in it (plus some other changes). I need to take the HTML code from that ASP, get rid of the beginning html = html part, edit the double "" and convert them to a single " (I need to do that one by one, because the variables also have quotes in them).

                  然后,我用 HTML 重新設置頁面的樣式,然后我需要將它轉換回來,以便我可以將它集成到 ASP (基本上再次引入雙 '"' 和其他東西).

                  Than, I restyle the page with HTML and after that I need to convert it back so I can integrate it in ASP (basically introduce the double '"' again and stuff).

                  是的,我可以直接從 ASP 編輯 HTML,但我不知道它的外觀,因為我無法運行腳本 (它需要來自服務器的其他文件,我不需要't 有權訪問).

                  Yeah, I could edit the HTML from the ASP directly, but I don't know how it might look, because I can't run the script (it needs other files from the server, which I don't have access to).

                  問題:

                  有更好的方法嗎?

                  某種方式可以直接預覽我在 ASP 中所做的事情.或者也許是一個工具,可以讓我從 ASP HTML 移動到 HTML 并更快地返回.

                  Some way of previewing what I'm doing in ASP directly. Or maybe a tool that let's me move from ASP HTML to HTML and back faster.

                  我當然知道我現在做的很蠢,所以一定有更好的辦法.

                  I sure know that what I'm doing right now is quite dumb, so there must be a better way.

                  推薦答案

                  作為 @steve-holland 提及創建模板是避免代碼中所有煩人的 HTML 字符串并使更改布局變得輕而易舉的好方法.

                  As @steve-holland mentions creating a template is a great way to avoid all the annoying HTML strings in the code and makes changing layouts a breeze.

                  我過去曾自己處理過 HTML 模板腳本,通常我會構建一個 Scripting.Dictionary,其中包含我將在模板中替換的鍵值對.

                  I've worked on HTML templating scripts myself in the past, usually I build a Scripting.Dictionary that contains the key value pairs I will be replacing inside the template.

                  Function getHTMLTemplate(url, params)
                    Dim stream, keys, html, idx
                  
                    Set stream = Server.CreateObject("ADODB.Stream")
                    With stream
                      .Type = adTypeText
                      .Charset = "utf-8"
                      Call .Open()
                      Call .LoadFromFile(url)
                      html = .ReadText(adReadAll)
                      Call .Close()
                    End With
                    Set stream = Nothing
                  
                    keys = o_params.Keys
                    For idx = 0 To UBound(keys, 1)
                      html = Replace(html, keys(idx), params.Item(keys(idx)))
                    Next
                    Set keys = Nothing
                    Set params = Nothing
                  
                    getHTMLTemplate = html
                  End Function
                  

                  用法:

                  Dim params, html
                  Set params = Server.CreateObject("Scripting.Dictionary")
                  With params
                    .Add("[html_title]", "Title Here")
                    .Add("[html_logo]", "/images/logo.gif")
                    '... and so on
                  End With
                  
                  html = getHTMLTemplate(Server.MapPath("/templates/main.htm"), params)
                  
                  Call Response.Write(html)
                  

                  示例main.htm結構:

                  <!doctype html>
                  <html>
                    <head>
                      <title>[html_title]</title>
                      <link rel="stylesheet" type="text/css" href="/styles/main.css" />
                    </head>
                  
                    <body>
                      <div class="header">
                        <img src="[html_logo]" alt="Company Name" />
                      </div>
                    </body>
                  </html>
                  

                  為什么使用 ADODB.Stream 而不是 Scripting.FileSystemObject?;

                  Why use a ADODB.Stream instead of the Scripting.FileSystemObject?;

                  1. 您可以控制返回的 Charset,如果需要,甚至可以從一個字符集轉換為另一個字符集.

                  1. You can control the Charset being returned and even convert from one to another if you need to.

                  如果模板特別大,您可以使用 Read() 方法以特定的緩沖區大小將內容流式傳輸,以提高讀取的性能.

                  If the template is particular large, you can stream the content in using the Read() method with a specific buffer size to improve the performance of the read.

                  這篇關于如何以更好的方式從 ASP 編輯 html?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  document.write() overwriting the document?(document.write() 覆蓋文檔?)
                  AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https(AngularJS 錯誤:跨源請求僅支持協議方案:http、data、chrome-extension、https) - IT屋-程序員軟件開發技術分
                  IE10 and Cross-origin resource sharing (CORS) issues with Image / Canvas(IE10 和 Image/Canvas 的跨域資源共享 (CORS) 問題)
                  Importing script with type=module from local folder causes a CORS issue(從本地文件夾導入 type=module 的腳本會導致 CORS 問題)
                  HTML crossorigin attribute for img tag(img 標簽的 HTML 跨域屬性)
                  <legend id='1Neba'><style id='1Neba'><dir id='1Neba'><q id='1Neba'></q></dir></style></legend>
                    <tbody id='1Neba'></tbody>

                      • <i id='1Neba'><tr id='1Neba'><dt id='1Neba'><q id='1Neba'><span id='1Neba'><b id='1Neba'><form id='1Neba'><ins id='1Neba'></ins><ul id='1Neba'></ul><sub id='1Neba'></sub></form><legend id='1Neba'></legend><bdo id='1Neba'><pre id='1Neba'><center id='1Neba'></center></pre></bdo></b><th id='1Neba'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1Neba'><tfoot id='1Neba'></tfoot><dl id='1Neba'><fieldset id='1Neba'></fieldset></dl></div>
                            <bdo id='1Neba'></bdo><ul id='1Neba'></ul>

                            <small id='1Neba'></small><noframes id='1Neba'>

                          • <tfoot id='1Neba'></tfoot>

                            主站蜘蛛池模板: 国产精品美女久久久 | 97视频精品| 精品国产欧美一区二区 | 欧美日韩成人在线观看 | www久久| 久久久爽爽爽美女图片 | 久久久久亚洲精品中文字幕 | 国产精品美女久久久 | 中文字幕亚洲欧美 | 欧美国产日韩一区二区三区 | 在线一区视频 | 国产精品成人在线播放 | 亚洲欧美另类在线 | 日本欧美在线视频 | 亚洲国产精品成人无久久精品 | 午夜影院在线观看版 | 亚洲国产精品久久 | 伊人网综合| 国产精品高潮呻吟久久av野狼 | 日韩精品一区二区三区在线观看 | 久久av网站 | 国产成人99久久亚洲综合精品 | 日日夜夜影院 | 欧美一级片黄色 | 精品久久久久久国产 | 亚洲欧美激情国产综合久久久 | 欧美中文字幕一区二区三区亚洲 | 美女福利视频一区 | 国产成人福利视频在线观看 | 91精品国产欧美一区二区成人 | 亚洲免费在线视频 | 在线中文字幕av | 成人在线中文字幕 | 综合久久亚洲 | 久久久久九九九九 | 成人在线视频一区 | 成年女人免费v片 | 国产精品亚洲成在人线 | 色久影院| 一区二区三区小视频 | 81精品国产乱码久久久久久 |