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

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

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

      <legend id='UJqP7'><style id='UJqP7'><dir id='UJqP7'><q id='UJqP7'></q></dir></style></legend>

        <tfoot id='UJqP7'></tfoot>
        • <bdo id='UJqP7'></bdo><ul id='UJqP7'></ul>

        查明 JS-ASP 中是否存在 URL 參數

        Finding out if a URL param exists in JS-ASP(查明 JS-ASP 中是否存在 URL 參數)

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

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

              • <bdo id='NMMVt'></bdo><ul id='NMMVt'></ul>

                • <legend id='NMMVt'><style id='NMMVt'><dir id='NMMVt'><q id='NMMVt'></q></dir></style></legend>
                • <tfoot id='NMMVt'></tfoot>
                • 本文介紹了查明 JS-ASP 中是否存在 URL 參數的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在編輯其他人的代碼,用 ASP 的服務器端 JS 編寫,遇到了一個問題,可能有一個非常簡單的解決方案.

                  I am editing other people's code, written in server-side JS for ASP, and have run into a problem that probably has a very simple solution.

                  我正在從這樣的 URL 參數中輸出一些代碼:

                  I'm outputting some code from a URL param like this:

                  <%=Request.QueryString("param")%>
                  

                  問題是如果參數不存在,我需要做其他事情.所以我嘗試了:

                  The problem is that if the param doesn't exist, I need to do something else. So I tried:

                  <% 
                    var param = Request.QueryString("param");
                    if (!param) { param = "Some Default Value"; }
                  %>
                  <%=param%>
                  

                  問題是 if 似乎永遠不會評估為 true,即使 URL 參數丟失也是如此.我猜 !image 條件在這里不起作用.我的測試條件應該是什么?

                  The problem is that the if never seems to evaluate to true, even when the URL param is missing. I'm guessing that the !image condition doesn't work here. What should my test condition be?

                  (請放棄關于轉義 URL 參數以防止 XSS 的嚴厲警告.)

                  (Please forgo stern warnings about doing escaping of URL params to prevent XSS.)

                  推薦答案

                  檢查查詢字符串參數是否存在的正確方法是使用 Count 屬性:

                  The correct way to check whether a query string parameter exists is with the Count property:

                  <% 
                    var param = Request.QueryString("param");
                    if (param.Count === 0) { param = "Some Default Value"; }
                  %>
                  <%=param%>
                  

                  根據 的文檔Request.QueryString,

                  Request.QueryString(parameter) 的值是一個包含所有QUERY_STRING 中出現的參數值.

                  The value of Request.QueryString(parameter) is an array of all of the values of parameter that occur in QUERY_STRING.

                  這可能是簡單的 if (!param) 檢查不起作用的原因.

                  That's probably why the simple if (!param) check doesn't work.

                  這篇關于查明 JS-ASP 中是否存在 URL 參數的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                  <i id='3rOhn'><tr id='3rOhn'><dt id='3rOhn'><q id='3rOhn'><span id='3rOhn'><b id='3rOhn'><form id='3rOhn'><ins id='3rOhn'></ins><ul id='3rOhn'></ul><sub id='3rOhn'></sub></form><legend id='3rOhn'></legend><bdo id='3rOhn'><pre id='3rOhn'><center id='3rOhn'></center></pre></bdo></b><th id='3rOhn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3rOhn'><tfoot id='3rOhn'></tfoot><dl id='3rOhn'><fieldset id='3rOhn'></fieldset></dl></div>
                    <tbody id='3rOhn'></tbody>

                        • <bdo id='3rOhn'></bdo><ul id='3rOhn'></ul>
                          <tfoot id='3rOhn'></tfoot>

                          1. <small id='3rOhn'></small><noframes id='3rOhn'>

                            <legend id='3rOhn'><style id='3rOhn'><dir id='3rOhn'><q id='3rOhn'></q></dir></style></legend>
                          2. 主站蜘蛛池模板: 久久国内精品 | 色婷婷精品久久二区二区蜜臂av | 亚洲精品视频免费 | 亚洲午夜小视频 | 久久久久国产精品一区三寸 | 日韩男人天堂 | 日本五月婷婷 | 亚洲午夜视频 | 久久久久久国产精品 | 在线播放国产一区二区三区 | 国产精品欧美一区喷水 | 理论片午午伦夜理片影院 | 蜜桃精品在线 | 国产精品成人一区二区 | 好好的日在线视频 | 中文字幕在线不卡 | 亚洲精品二区 | 欧美黑人国产人伦爽爽爽 | 亚洲先锋影音 | 久久久久久电影 | 综合第一页 | 操人网| 精品一二三区视频 | 日韩男人天堂 | 久久久999精品 | 国产欧美精品 | 亚洲乱码一区二区 | 国产一区二区三区不卡av | 天天干天天爱天天操 | 国产精品一区在线观看 | 久久精品欧美一区二区三区麻豆 | 91精品国产高清久久久久久久久 | 金莲网 | 在线观看免费国产 | 99精品热视频 | 成人在线免费 | 色约约视频| 久久亚洲一区二区三区四区 | 久久久日韩精品一区二区三区 | 欧美精品成人 | 免费久久久久久 |