About Mencius E Chapter Heroes' "with pictures, multi-column DropDownList's realization" learning and improv

xiaoxiao2021-03-06  122

Originally, please see: http://blog.9cbs.net/net_lover/archive/2004/07/29/55679.aspx? Pending = True Key Analysis: 1, use CSS to simulate DIV into text boxes, is it a high person? ! It is also possible to see the beautification function of CSS is a strong horror: P

please choose?

Note: I also added script processing. Meng Lao's original procedure is not, but I think it is more like DropDown List :) 2, use CSS special fonts to simulate Div and digital to simulate the buttons and arrows, really Gao people! Special fonts sometimes have their unreasonable buttons background: buttonface; normal button stereo Border-Left: 2px outset; border-top: 2px outset; border-rt: 2px outset; button stereo Border -LEFT: buttonshadow 1px solid; PADDING-LEFT: 2px; BORDER-TOP: buttonshadow 1px solid; PADDING-TOP: 2px; BORDER-RIGHT: buttonshadow 1px solid; PADDING-RIGHT: 0px; BORDER-BOTTOM: buttonshadow 1px solid; PADDING -BOTTOM: 0PX; Arrow Font: 14px Marlett;

Seduce

Note: I will change the original number 6 to 7, you see if there is no more beautiful :) 3. Use scripts and CSS to implement the button dynamic effect when the mouse is released. οnmοuseup = "arrow1.classname = 'link_arrow0'" οnmοusedοwn = "arrow1.classname = 'link_arrow1'" 4. Using a table or DIV to simulate the drop-down list, it is simple to join the image prefix. ASP: BoundColumn and DataFormatString are indeed powerful, it will determine the Width of TD and attach images or texts that will formatted the variable to the body.

DataFormatString = "

{0} ">

Of course, I don't do IMG in DIV, I don't do it.

5. Use scripts and CSS to achieve the anti-white effect of the cursor.

οnmοuseοver = "this.bgcolor = '# c1d2ee'"? οnmοuseοut = "οnmοuseοut =" bnmοuseοut = "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "

6. Key CSS implementation of DIV instant hidden and display! El.style.visibility = "visible" el.style.visibility = "hidden" below is an improved description: 1. Meng Lao is aesthetics, adding a space between the pictures and the title, but in this way, SexT1 is selected There will be a space! To eliminate it, it is of course very simple, only use trim, the problem is that JS does not have this function, you have to implement it with a regular table format. Of course, you can easily remove the first space characters simply with Substring. But my approach is to implement it with VBScript. So, there is no language is perfect, sometimes matching each other is the most cool, just as men and women do not have a job:) VBScript: Document.all.Text1.innertext = Trim (Document.All.DataGrid1.cells (0). InnerText) Note: Unfortunately, VBS has TRIM, but there is no THIS, can only be changed to Document.all.DataGrid1. 2. When the mouse is moved (Beijing), then move back to the Table list (article), the Div list will still retain a back-white sign! Although the real application should not be used in the same time with Table and DIV, I still correct it: p As long as the original hilight (el) function is copied to a ClearHilight (EL) function, and make the following modification : Function Clearhilight (EL) {// Clear all high brightness display EL = document.getlementByid (el); //alert (ketildnodes.lend "; if (dropshow) {for (i = 0; i ?? {EL .childNodes (i) .classname = "link_record0"}}} When the last in the table list, οnmοuseοver = "this.bgcolor = '# c1d2ee'"? Plus Clearhilight ('mx') can be 3. I don't want Meng Lao's fade out (too fancy: P), so I canceled this function, but an important issue happened! Please note that the last sentence of Meng Lao's script: Document.οnclick = Dropdownhide This script means Anything in this web document will call this hidden drop-down function! The problem is that you are not only in other places, you are when you click on the button or text box, even in the specific item in the selection list, will Troven this function! I found the fact that the above fact! But why didn't you happen? It turns out that the settimeout in these two functions plays a key role. When this function is executed, the system will time The film is given to other scripts, so that when DROPFADEOUT () is completely completed, its Dropshow is still false, so even if DropDownHide () does not cause any consequences.

转载请注明原文地址:https://www.9cbs.com/read-126222.html

New Post(0)