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

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

      <bdo id='moHjh'></bdo><ul id='moHjh'></ul>

      <tfoot id='moHjh'></tfoot>

    1. <small id='moHjh'></small><noframes id='moHjh'>

      1. jquery按長度限制文本

        jquery limit text by length(jquery按長度限制文本)
          <bdo id='zDfX8'></bdo><ul id='zDfX8'></ul>
          <tfoot id='zDfX8'></tfoot>

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

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

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

                <tbody id='zDfX8'></tbody>

                1. 本文介紹了jquery按長度限制文本的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我可以在使用 jQuery 的多個(gè)字符之后隱藏 DIV 中的文本嗎?

                  Can i hide text in a DIV after a number of characters with jQuery?

                  到目前為止,我認(rèn)為它會(huì)是這樣的——jQuery 會(huì)循環(huán)遍歷文本,直到達(dá)到一定數(shù)量的字符.然后它將從該位置包裝一個(gè) DIV 到文本的末尾,然后可以使用 hide() 方法將其隱藏.我不確定如何插入該環(huán)繞文本.

                  So far I think it would go something like this - jQuery would cycle through the text until it gets to a certain number of characters. It would then wrap a DIV from that position to the end of the text which could then be hidden with the hide() method. I'm not sure how to insert that wrapping text.

                  也將不勝感激.

                  謝謝.

                  推薦答案

                  這樣會(huì)隱藏部分文字

                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  
                  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                  <head>
                      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                  
                      <title>untitled</title>
                      <style type="text/css" media="screen">
                          .hide{
                              display: none;
                          }
                      </style>
                      <script src="js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
                      <script type="text/javascript" charset="utf-8">
                          $(function(){
                              var $elem = $('p');         // The element or elements with the text to hide
                              var $limit = 10;        // The number of characters to show
                              var $str = $elem.html();    // Getting the text
                              var $strtemp = $str.substr(0,$limit);   // Get the visible part of the string
                              $str = $strtemp + '<span class="hide">' + $str.substr($limit,$str.length) + '</span>';  // Recompose the string with the span tag wrapped around the hidden part of it
                              $elem.html($str);       // Write the string to the DOM 
                          })
                      </script>
                  
                  </head>
                  <body>
                  <p>Some lenghty string goes here</p>
                  </body>
                  </html>
                  

                  這篇關(guān)于jquery按長度限制文本的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Why does my website crash in IE?(為什么我的網(wǎng)站在 IE 中崩潰?)
                  CSS3 Transition ( Vendor Prefixes) crashes Safari immediately(CSS3 過渡(供應(yīng)商前綴)立即使 Safari 崩潰)
                  @font-face crashes IE8(@font-face 讓 IE8 崩潰)
                  Remove formatting from a contentEditable div(從 contentEditable div 中刪除格式)
                  Floated Child Elements: overflow:hidden or clear:both?(浮動(dòng)子元素:溢出:隱藏或清除:兩者?)

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

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

                        • <bdo id='g5wIN'></bdo><ul id='g5wIN'></ul>
                            主站蜘蛛池模板: 黑人操亚洲人 | 黄色在线免费观看视频 | 张津瑜国内精品www在线 | 国产福利在线视频 | 午夜久久久久久 | 国产超碰在线 | 日韩中文一区 | 色羞羞 | 日本成人一区二区三区 | 攵女(高h)欢欲 | 日韩欧美在线视频 | 亚洲最新网址 | 一区二区三区四区视频 | 久草视频免费看 | 夜夜操夜夜爽 | 九九热在线观看视频 | 亚洲性av| 亚洲三级小说 | 欧美三级 欧美一级 | 国产乱淫av | 欧美一区二区三区成人 | 欧洲精品 | 四虎免费视频 | 97色综合 | 欧美性猛交一区二区三区精品 | 成年人视频在线播放 | 香蕉视频免费看 | 狠狠艹狠狠干 | 午夜视频在线免费观看 | 久热精品在线 | 日韩视频网 | 日韩专区中文字幕 | 91久久久久久久 | 成年视频在线观看 | 色av导航 | 国产一区不卡 | 日本中文字幕在线播放 | 中文字幕亚洲精品 | 青青草视频在线观看 | 欧美精品综合 | 欧美激情国产精品 |