New bless box window implementation [html]

xiaoxiao2021-03-06  57

A boundless box window (CW) without border and menu bar, toolbar, address bar, status bar, etc., is very popular, and is adopted by many websites, especially personal websites, CW also has ready-made source code for netizens, but The initial CW is very inconvenient, there are two JS files, but also set some parameters, which is very difficult for some beginners. So I have an idea: rewrite a new boundless box window, only one function is implemented, for users to use. I gave this new boundless frame window named NBW, NBW, NO BORDER WINDOW, just wants to distinguish between CW. This boundless box window can be dragged, minimize, close, etc., not only in IE5 / IE6, not only testing in Tencent TE. First look at the actual effect: The process of call is as follows: (the Noborderwin function is good predecessor, and the implementation process of the function will be analyzed) Noborderwin (FileName, W, H, Titlebg, MoveBG, Titlecolor, TitleWord, SCR) each parameter The description is as follows: filename: The file to be opened. W: Width (PX) of the window. H: The height (PX) of the window. Titlebg: Window "Title Bar" background color and window border color. MoveBG: Drag the background color of the "Title Bar" when the window and the window border color. Titlecolor: The color of the "Title Bar" text. TitleWord: The text displayed in the Window "Title Bar". SCR: Whether the scroll bar is displayed in the window. Value YES / NO or 1/0. We see that all window styles are set in the parameters of the function, thereby ensuring the convenience of use. For example, the code of the above example is as follows: Click here to pop up the NBW window How to use it, then how this function is implemented? Below, we explain in a way that directly gives the edition and comment. In order to easily distinguish reading, the code section uses gray, and the comment portion uses red. Codes and comments are as follows: // ------------------------------------------- -------------------------------------------------- -----