[Daily] ie pop-up window & SQL split string

Source: Internet
Author: User
1. Differences in the pop-up window size of each version in IE * IE6 IE7 IE8 compatibility
* Principle:
* 1. The height of an open window in IE6 environment includes the title bar and status bar.
* 2. When the window height is opened in IE7, the status bar and title bar are not included.  
* 3. The height of the window opened in IE8 does not include the status bar and title bar (but the padding is about 10 px)
* Operation:
* Taking the IE6 environment as an example, it is appropriate to adjust the pop-up window to the button area without the vertical scroll bar (the top margin is about 5 PX, and the bottom margin is controlled by CSS to 5 px)
* In IE7 environment, the height of IE6 is reduced by 50px.
* In IE8 environment, the height of IE6 is equal to 60px.   Function   Showmodal ( Ie8option ) {
  VaR   Ieheight   =   Ie8option. Height ; // IE 6.0
  If (navigator. useragent. indexof ("MSIE 6 ")! =-1)   {
Ieheight   + = 60 ;
  } User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; sv1 ;. net CLR 1.1.4322) get the value of the HTTP user proxy header sent from the client to the server showmodal can only be opened in IE. For example, in the non-modal pop-up window, use window. Open and use opener to access the parent page. To display the modal window, use Div
2. SQL delimiter SQL has weak processing capabilities on strings. For example, if I want to traverse strings such as 1, 2, 3, 4, and 5 cyclically, traversal is simple if arrays are used, but the T-SQL does not support arrays, so it is more troublesome to process. The following function implements string processing like an array. Http://www.blogjava.net/supercrsky/articles/260998.html
I. Use a temporary table as an array
CopyCode The Code is as follows:
Create Function f_split (@ C varchar (2000), @ split varchar (2 ))
Returns @ t table (COL varchar (20 ))
As
Begin

While (charindex (@ split, @ C) <> 0)
Begin
Insert @ T (COL) values (substring (@ C, 1, charindex (@ split, @ C)-1 ))
Set @ C = stuff (@ C, 1, charindex (@ split, @ C ),'')
End
Insert @ T (COL) values (@ C)
Return
End
Go

Select * From DBO. f_split ('dfkd, dfdkdf, dfdkf, dffjk ',',')

Drop function f_split
Col
--------------------
Dfkd
Dfdkdf
Dfdkf
Dffjk

(The number of affected rows is 4) Publish via wiz

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.