First, refer to layer and download it yourself.Add the following two linesLayer.open ({type:2, Skin:' Layui-layer-lan ', Title:Title, FIX:false, Shadeclose:true, Maxmin:true, area: [' 800px ', ' 400px '], content:' Default.aspx ', //end:function () {//Turn off popup layer triggering //location.reload (); Refreshes the parent interface and can be changed to another //} });In the
These are pop ups created using JavaScript. The ones below come from the watir unit tests.
They wocould be created using JavaScript, and an example is shown under each of them.
Solution #1Http://rubyforge.org/pipermail/wtr-general/2005-April/001461.html
Solution #2
# Auto Popup Handler. Posted by brad@longbrothers
This article summarizes the commonly used JavaScript pop-up window method, for everyone to compare the reference, hope to be helpful to everyone. The detailed methods are as follows:1. Silently refresh the webpage:We have found that some pages, when refreshed, will pop up a prompt window, the point "OK" will be refreshed.And some pages will not prompt, do not pop up the prompt window, directly on the refresh.If the page does not have a form,The prompt
The example in this article describes the effect of a JavaScript popup box with text messages. Share to everyone for your reference, specific as follows:
Tooltips.js:
Position of the ToolTip relative to the mouse in pixel//var offsetx = 12;
var offsety = 8;
function newelement (NEWID) {if (document.createelement) {var el = document.createelement (' div
. Through javascript, we can control the position of its appearance or write content into it. note: If the content exceeds the display range after the size is fixed, no scroll bar will appear. If you click it outside, it will automatically disappear. it uses the parent attribute to access its window.
1. Syntax
Create a popup object;
Var popupobj = window. createPopup ()
Access the attributes and methods of
To add a tooltip to an HTML page, you can use the title, ALT, and popup methods.
1. Use the title attribute
Syntax Element Title ="
Value ">... Element >
Example: Title = "this is a link" Href = "http://www.cnblogs.com/leeym/" target = _ blank> blog address
Title can be used for most page elements2. Use the alt attributeALT is a read/write attribute.Syntax document. getelementbyid (" Elementid "). Al
;
Visibility:hidden;
Overflow:hidden;
border:1px solid #CCC;
Background-color: #F9F9F9;
border:1px solid #333;
padding:5px;
}
From the red part of the CSS code above, you can see that this div layer's initial default state is not visible.
You can beautify the above code as needed, but be sure to keep the Position,visibility,overflow three attributes.
JavaScript code is used to trigger and display pop-up windows:
This is prob
box appears, the user needs to click the OK or Cancel button to continue the operation. If the user clicks Confirm, then the return value is true. If the user clicks Cancel, the return value is false. Syntax: Confirm ("text")Cue box prompt ()Prompt is a prompt box that returns the input message, or its default value hint box is often used to prompt the user to enter a value before entering the page. When the prompt box appears, the user needs to enter a value and then click the Confirm or Cance
This article mainly introduces how to display the javascript control page in full screen mode and exit full screen mode. The example analyzes the javascript control page in full screen mode and has some reference value, for more information about how to display and exit the
The JavaScript-break statement is used to exit the loop.The break statement is used to exit a loop.Continue is used to skip an iteration in a loop.Break statementWe have seen the break statement. It is used to jump out of the switch () statement.The break statement can be used to exit a loop.After the break statement j
Javascript control page full screen display and exit full screen display
This article mainly introduces how to display the javascript control page in full screen mode and exit full screen mode. The example analyzes the javascript
Native javascript seamless scrolling currently supports vertical and horizontal scrolling. The following is a good example. You can refer to the currently supported vertical and horizontal scrolling.
Http://lgyweb.com/marScroll/
The following figure shows the basic idea for achieving seamless seams (vertical example ):
HTML structure:
The Code is as follows:
This article introduces the commonly used page jump implementation methods, including the JS php asp.net these three kinds of implementation code, there is a need to understand friends can refer to.
First to introduce the practice of JS
The code is as follows
Copy Code
function Tourl (UL) {if ("" = = UL | | Null==ul) {Alert ("Thank you for attention");}else{WINDOW.OPEN (UL);//This is a new window.window.location.href=ul;//This is directly on the current page jump}Re
ordered array , the principle is the index takes the judgment, the gradual two-point discards reduces the comparison scope, finally finds the index value of the data, the advantage is the comparison few times, can save the computer resources when the big data searches varattr =[1,2,3,4,5,6,7,8,9,10];//Original Array varsr = 11;//data that needs to be looked up varMINXL = 0;//Minimum Index varMAXXL =attr.length-1;//Maximum Index varMIDXL = 0;//Fetch Medium Index while(true)
Today is September 30, 2014, tomorrow is the National day, first of all, I wish our great Motherland Happy birthday.A few minutes to get off work, to study a few days about the require library of the modular development of related articles,Finally wrote the first love of the modular example: Pop up a login box:First: Introduce the Require library file to the static page and introduce the main script file (main.js) in the introduction tag1 2: First, be
This #btncomfirmchoosecompany is a button on the bootstrap modal layer, but after clicking, the Click event is bootstrap the outer monitor hears, the effect is the modal popup layer is closed, so I do not want this click event is "passed" to the "outer" page.Please note that the parameter E is missing from the beginning and the effect of the code does not meet my expectations.$ ("#btnComfirmChooseCompany"). Click (function(e) {varCompanyName = ""; var
characters. Objects can also be passed, for example:
Parent.htm:
《script》var obj = new Object();obj.name="51js";window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px");《script》
Modal.htm:
Script var obj = window. dialogArgumentsalert ("The parameter you passed is:" + obj. name) script
2. you can use window. returnValue to return information to the window that opens the dialog box. It can also be an object. For
Selenium to get the JavaScript return value is very simple, just need to return the data in the JS script can be returned, and then through the method to return JS execution results, the method source code is as follows:1 /**2 * Get Object of return from JS3 * 4 * @authorAARON.FFP5 * @versionV1.0.0:autoseleniumdemo main.aaron.sele.core Seleniumcore.java execjsr, 2015-8-9 1:39:17 Exp $6 * 7 * @paramJs:return_js8 * 9
Use if to exit recursionPersonal feeling recursive use or the same as other languagesAn example of the factorial of JavaScript-4.4 function recursion---shinepans
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.