(43) JS motion chain framework, js chain
A chained motion frame is a series of movements in stages. A function is added to a common motion frame. This function indicates the next action to be executed. The Code is as follows:
<! Doctype html> <! -- Chained motion frame: the motion is carried out in stages. When the motion stops, execute the next motion --> :
When the mouse moves in, the width is changed horizontally, the width is increased vertically, and the transparency is changed to 100. The effect is as follows:
When the mouse is removed, the effect is exactly the opposite of the above:
How to dynamically open a hyperlink in JS in a Web Framework
According to your statement, it seems that no backend is needed to decide which page to jump !? That is to say, the target may be completed on the page.
If your 1.html, 2.html, 3.html ......, If not, you can use the js jump I wrote.
The main code is on the Framework page, so I only paste the framework Page code.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN" "www.w3.org/..ct.dtd">
<Html xmlns = "www.w3.org/5o/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document </title>
<Script>
// Store the list of addresses on your framework page
Var webList = ["1.html", "2.html", "3.html"];
// Used to lock the current page
Var local = 0;
Function goto (o, d ){
If (d = "up "){
If (local-1> = 0 ){
O. href = webList [-- local];
O. submit ();
} Else return;
} Else {
If (local + 1 <webList. length ){
O. href = webList [++ local];
O. submit ();
} Else return;
}
O. href = "javascript: void (0 )"
}
</Script>
</Head>
<Body>
<P> <a target = "frame1" href = "javascript: void (0)" onclick = "goto (this, 'up')"> previous page </a>,
<A target = "frame1" href = "javascript: void (0)" onclick = "goto (this, 'drop')"> next page </a> </p>
</Body>
</Html>
>... Remaining full text>
For the connection of various windows in the JS control framework
Onclick = "window. parent. frames [2]. location. href = 'www.baidu.com '"As you said, top.html \ left.html \ right.htmlthree pages are child pages of 1.html. In DOM, they are all contained in frames objects, So window. parent. in frames [2], a window belongs to the listening object of the entire window, followed by the parent page of parent and three child pages, followed by a child page. Because the child page is a set, some values can use numbers as indexes, and 0 indicates top. 1 indicates left, 2 indicates right. Of course, you can also use their name value or ID as an index.