How to control the number of characters in the title, and how to control the number of words in the

Updated on technology 2024-04-11
12 answers
  1. Anonymous users2024-02-07

    Upstairs is such a waste of resources. I'll give you a function that I wrote myself. Regular expressions are used. Hope you understand.

    The method that is called is:" target="_blank"><%=cutstr("biaoti")),15)%>

    The length of Chinese is 2, you can test the length of writing by yourself!

    Take the byte length of the character, the length of the Chinese character *2

    strout to enter characters.

    length outputs the length of the character.

    The return value is string

    public function cutstr(byval strout,byval length)

    dim intlength,strreturn

    intlength = 0

    strreturn = ""

    if len(strout&"") strreturn = strout

    elseset regex = new regexp

    true true

    [^\x00-\xff]"

    for inti = 1 to len(strout&"")

    if intlength < length then

    if ,inti,1)) then

    intlength = intlength + 2

    elseintlength = intlength + 1

    end if

    elsestrreturn = left(strout,inti-1)

    exit for

    end if

    nextend if

    set regex = nothing

    cutstr = strreturn

    end function

  2. Anonymous users2024-02-06

    target="_blank"><%

    Determine whether the length is greater than 15, and add ellipsis to the first 15 output.

    if len(zuixin("biaoti")) 15 then"biaoti"),15) &"..."))"biaoti")))

    end if

  3. Anonymous users2024-02-05

    " target="_blank"><%= rs("title") %

    It will be the number of words of the limited title.

    Use the left function.

    left(rs("title"),10) '10 represents the 10 words on the left.

  4. Anonymous users2024-02-04

    You can use a label to write the title!

    In the label, you can limit the characters that can be entered next to it.

    At the same time, it is achieved to control the number of words in which title of the article wheel.

  5. Anonymous users2024-02-03

    You can directly set the line height and character spacing in the layer of your title, you can do as much as you want!! Hehe!! You try.

  6. Anonymous users2024-02-02

    select left(title,12)title from table, there are only 12 words to find out, and you can bind them to the corresponding position.

  7. Anonymous users2024-02-01

    Make a judgment if the title is longer than 12 words then replace the following one with an ellipsis!

  8. Anonymous users2024-01-31

    Basic function left(string to be intercepted, length to be intercepted)'Intercept characters of a specified length from the left right(string to be intercepted, length to be intercepted)' to intercept characters of a specified length from the right mid(string to be intercepted, position to be intercepted, length to be intercepted)Characters of a specified length to be intercepted from any position Functional'strsub 'Function: String truncation. 'Parameter significance:

    str -- the string to be truncated. lennum - the number of characters to be intercepted. s--ending character function strsub(str,lennum,s) if not isnull(str) then dim p num,x dim i if strlen(str)<=lennum then strsub=str else p num=0 x=0 do while not p num > lennum-2 x=x+1 if asc(mid(str,x, 1)) "Define the display method of the excess content after the capture loop end if else strsub="null" end if end function 'Call <%function strsub("aaaaaaaaaa",3,".

    Will output: aaa....

  9. Anonymous users2024-01-30

    The word limit of the title is generally within eight crosses, and it is not necessary to use so much under normal circumstances, and the modification can be directly modified in the **background.

  10. Anonymous users2024-01-29

    white-space:nowrap; overflow:hidden; text-overlow:ellipsis; width:300px;

    The width should be set by yourself, and this excess is indicated by an ellipsis.

  11. Anonymous users2024-01-28

    。。。People just ask for an html.,You look at css,js.。。。

  12. Anonymous users2024-01-27

    div can add the pants sentence of Si Que Jian in CSS, if the number of words is intercepted, it will be automatically displayed as the year.

Related questions
9 answers2024-04-11

First of all, the content of the press release must meet the requirements, regardless of the quality of your soft text, and you must carefully read the column requirements and content attributes before publishing. If it's your own, you have to write something related to your, how to publish your own soft copy, how to set keywords, you have to configure it well in advance, and your published content must be relevant to your topic. >>>More

12 answers2024-04-11

Alignment is how paragraph content is arranged horizontally between the left and right boundaries of the document. There are a total of 5 alignment styles in Word: Left Alignment, Right Alignment, Center Alignment, Ends Alignment, and Scattered Alignment. >>>More

8 answers2024-04-11

Press release writing is brief.

The headline is the eyebrow of the news and the essence of the news content. The headline is the first impression the news gives to the reader. The headline is chic, and the news will be colorful; Conversely, the news is not glorious. >>>More

20 answers2024-04-11

If you're a member of the foodie family and often have an uncontrollable appetite, here are some ways to overcome your appetite: >>>More

16 answers2024-04-11

1. When emotions are about to get out of control, leave the place of anger or the other party. >>>More