In the JS page, the selection box pops up after the default focus on the first, we can go through the selection to the Cancel button and then proceed to the focus event.The code is as follows:functionComfirmshow () {$.messager.confirm ("Hint", "OK to delete selected information?",function(){});var okspans=$ (". L-btn-text");var len=Okspans.length;Forvar i=0;i){ var $okSpan =$ (Okspans[i]); var okspanhtml= $okSpan. html (); if (okspanhtml== "Cancel
".Hint message box (prompt)The Hint message box provides a text field where the user can enter an answer in response to your prompt. The message box has a "OK" button and a "Cancel" button. If you provide a secondary string argument, the prompt message box displays the auxiliary string as the default response in the text field. Otherwise, the default text is "Similar to the alert () and Confirm () methods, the Prompt method also displays a modal message box.Jump out of a message box, you need to
Css|js
MSN Prompt window is very classic, so we also do a JavaScript implementation, for everyone to entertain.Gossip is not much to say, the JavaScript code is as follows:
Only JavaScript code is not enough, we also need CSS to define the style:
div#emsg{}{Background-color: #c9d3f3;Border-left: #a6b4cf 1px solid;Border-right: #455690 1px solid;Border-top: #a6b4cf 1px solid;Border-bottom: #455690 1px solid;
1, Warning message box alert ()The alert method has a parameter, which is the text string that you want to display to the user. The string is not in HTML format. The message box provides a OK button to let the user close the message box, and the message box is a modal dialog box, which means that the user must close the message box before proceeding.2, Confirm message box confirm ()Use the confirmation message box to ask the user a yes-or-no question, and the user can choose to click the OK butt
| | ‘‘); }Else{o[ This.name] = This. value | | ‘‘; } });returno;}functionGetfilebatchno () {returnLoginaccount.accountid + "_" +New Date(). GetTime ();}functionIsLeaf (node) {returnNode.state = = undefined;}functionDowloadfile (downLoadFile) {varFileNames = [' Googlechromeframestandaloneenterprise.msi ', ' Flashplayer11-7_install_win_ax.exe '];varmsg = ["The system needs IE8 and above, if your browser version is too low! To provide a better experience, please click "OK" to down
Js implements the method for controlling DIV movement by keyboard, and js keyboard div Movement
This article describes how to control DIV movement by using the keyboard in JavaScript. Share it with you for your reference. The specific analysis is as follows:
Css style sectio
method Cursor:url (Dinosaru.ani); inputtype= "button"name= "Name"value= "I am an old horse, point me, be ruthless." />If I am evil, please remember that I have been pure. ulstyle= "list-style-type:none;padding:0"> Li>Damn, it's getting pretty again.Li> Li>Damn, it's getting pretty again.Li> Li>Damn, it's getting pretty again.Li> Li>Damn, it's getting pretty again.Li> Li>Damn, it's getting pretty again.Li> ul> Tablestyle= "border:1px Red s
Div's visibility can control the display and hiding of the Div, but the page appears blank after hiding.Style= "Visibility:none;" document.getElementById ("Typediv1"). style.visibility= "hidden";//Hide document.getElementById ("Typediv1"). style.visibility= "visible";//DisplayBy setting the Display property, you can make the div hide and then release the occupied page space as followsStyle= "Display:none;
The code of the DIV simulated modal window is converted from the JS class of a custom modal window (implemented using Div) in [Sailor ID: shuishou119800 )]:Modal window JS :( subwindow. JS)
Function subwindow (titlemsg, content, winwidth, winheight, bordercolor, titlecolor,
The HTML code is as follows. The div to be dragged is the div of the outermost layer.Copy codeThe Code is as follows: The js Code is as follows,Copy codeThe Code is as follows:$ ("# McreateUserGroup"). mousedown (function (e ){Var flag = true;E = e | event;Var $ dialog_createUserGroup = $ ("# dialog_createUserGroup ");Var LEFT = e. clientX-parseint(includialog_cr
The HTML code is as follows, where the div to drag is the outermost div
Copy Code code as follows:
The JS code is as follows,
Copy Code code as follows:
$ ("#McreateUserGroup"). MouseDown (function (e) {
var flag = true;
E = e| | Event
var $dialog _createusergroup = $ ("#dialog_createUserGroup");
var left = E.clientx-pars
Use DIV+CSS to achieve nine Gongge, and then use the JS implementation Click each lattice can randomly change the background color of the lattice (DIV)
Tip: you can modify some code before running Js to get the div content and div valueThis is before using js to change my valueJs get div contentModify my valueThis site original tutorials Reprinted from the source of http://www.111cn.net otherwise it is necessary to study T
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.