html
做一个多项选择界面,选择一项弹出一个新页面,选择完这一项之后,返回之前的主html页面。
比如说主页面A,有两个选择项,1和2,点击弹出对应的页面1和页面2,在这两个页面选择对应的东西,选择完页面1之后把数据返回到A主页面两个text里,继续选择页面2,选择完页面2后,数据返回到A主页面另一个text里
回复讨论(解决方案)
我现在已经做出了选择功能了,但是选择完一个再选另一个,之前已经选择好了的就找不到了
大侠们还没上班吗?
没人帮忙吗?这个很难吗?
测试页面:
<html> <head> <title>测试</title> <script> function selectWin(index) { if(index==1) { window.open("1.html"); } else { window.open("2.html"); } } </script> </head> <form name="myform"> <table> <tr> <td>选择</td> <TD> <INPUT type="checkbox" name="chk" value="1" onclick="selectWin(this.value)">选择一 <INPUT type="checkbox" name="chk" value="2" onclick="selectWin(this.value)">选择二 </TD> <tr> <tr> <td> <input type="text" name="txt1"> <input type="text" name="txt2"> </td></tr> </table> </form> </html>
1.html
<html> <head> <title>测试</title> <script> function returnVal(index) { window.opener.document.forms[0].txt1.value=index; window.close(); } </script> </head> <form name="myform"> <table> <td> <input type="text" name="txt1"> <input type="button" value="返回" onClick="returnVal(document.forms[0].txt1.value);"> </td></tr> </table> </form> </html>
2.html:
<html> <head> <title>测试</title> <script> function returnVal(index) { window.opener.document.forms[0].txt2.value=index; window.close(); } </script> </head> <form name="myform"> <table> <td> <input type="text" name="txt1"> <input type="button" value="返回" onClick="returnVal(document.forms[0].txt1.value);"> </td></tr> </table> </form> </html>

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
