Detailed explanation of examples of page jumps and value transfer
This article mainly introduces the Web front-end page to jump and get the value, that is, jump from page A to page B, and get the value of page B and assign it to page A for display. Please refer to the specific implementation method. Next article
Record it
(jump from page A to page B, and get the value of page B and assign it to page A for display)
Let’s give an example first A chestnut ;)
This is page A
This is page B
By clicking The added log on page A jumps to page B, and the log content added on page B is transferred to the red box position on page A
First quote js, I have one of my own that quotes openpage.js Plug-in
//这个是放在A页面上的 //将填写的日志 返回的json数据 填充到客户详情 function DunnAge(data) { //成功之后从B页面返回的数据data var data = JSON.parse(JSON.stringify(data)); var Remark = data.Body.Remark;//内容 var AddTimeStr = data.Body.AddTimeStr; var html = '<p class="accessLog"><p class="val-log">' + Remark + '</p><p class="time-log">' + AddTimeStr + '</p></p>'; $(".js_noJilu").hide(); $(".js_rizhi").prepend(html) } <p class="detailss-btn js_openPage" data-url="/OACustomer/AddLogView?Id=@detail.Id">添加日志</p>
Configure the header in public js
(Detailed App header configuration instructions- ---------App configuration page header)
A页面的头部 "/OACustomer/CustomerDetail": { title: "客户详情", headLeft: [{ foreImage: "iconback", eventString: "gjj://Close.Page/1?jsCallBack=JC5wYWdpbmcuc2VhcmNoKCk7"}], headRight: [{ foreImage: "icondrop", type: "DropDownList", menus: [{ iconImage: "iconcontentchange", alpha: "100", text: "修改客户信息", textSize: 16, textColor: "000000", backColor: "FFFFFF", eventString: "modiFicaTion()" }, ], }] }, B页面的头部 "/OACustomer/AddLogView": { title: "添加客户日志", headRight: [{ text: "提交", eventString: "submit()" }] }//js里配置的头部 //这是放在B页面上的 //提交 function submit() { var mes = $("form").validtor(); if (mes) { $.dialog.openDialogString(mes); return false; } var url = "/OACustomer/SubmitAddLog"; $.ajax({ type: "post", url: url, data: $("form").serialize(), dataType: "json", beforeSend: function () { }, error: function () { $.dialog.openDialogString("加载失败,请重试"); }, success: function (data) { if (data.DictJsonStatus == 200) { //将填写的日志 返回的json数据 填充到客户详情 $.zProtocol({ type: "Close.Page", path: "/1", success: 'DunnAge(' + JSON.stringify(data) + ')' }); } else { $.dialog.openDialogString(data.Msg); } } }) } //页面内容 <form action="/OACustomer/SubmitAddLog">//后台提交数据的action(SubmitAddLog) <!------action 提交地址------> <input type="hidden" value="@detail.Id" name="FkOACustomer"/> <p class="remarks"> <p><i style="color:#f00">*</i>备注留言:</p> <p> <textarea placeholder="请填写申请表述(必填)" class="js_inputbox" name="Remark" data-tipname="备注留言" data-valid='{required:true}'></textarea></p> </p> </form>
After fetching the data, click Submit to close one page, page B, and return to the previous page, page A. Finally, the data was retrieved and displayed in the red box on page A.
【Related recommendations】
2. Detailed explanation of how to handle IE8 incompatible rgba()
3. Detailed explanation of the code for phonegap to complete the contact search function
5. phonegap listens for other events after the deviceready event is triggered
The above is the detailed content of Detailed explanation of examples of page jumps and value transfer. For more information, please follow other related articles on the PHP Chinese website!

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics

Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

H5 page production refers to the creation of cross-platform compatible web pages using technologies such as HTML5, CSS3 and JavaScript. Its core lies in the browser's parsing code, rendering structure, style and interactive functions. Common technologies include animation effects, responsive design, and data interaction. To avoid errors, developers should be debugged; performance optimization and best practices include image format optimization, request reduction and code specifications, etc. to improve loading speed and code quality.

The steps to create an H5 click icon include: preparing a square source image in the image editing software. Add interactivity in the H5 editor and set the click event. Create a hotspot that covers the entire icon. Set the action of click events, such as jumping to the page or triggering animation. Export H5 documents as HTML, CSS, and JavaScript files. Deploy the exported files to a website or other platform.

H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

H5 is not a standalone programming language, but a collection of HTML5, CSS3 and JavaScript for building modern web applications. 1. HTML5 defines the web page structure and content, and provides new tags and APIs. 2. CSS3 controls style and layout, and introduces new features such as animation. 3. JavaScript implements dynamic interaction and enhances functions through DOM operations and asynchronous requests.

H5 (HTML5) is suitable for lightweight applications, such as marketing campaign pages, product display pages and corporate promotion micro-websites. Its advantages lie in cross-platformity and rich interactivity, but its limitations lie in complex interactions and animations, local resource access and offline capabilities.

H5 pop-up window creation steps: 1. Determine the triggering method (click, time, exit, scroll); 2. Design content (title, text, action button); 3. Set style (size, color, font, background); 4. Implement code (HTML, CSS, JavaScript); 5. Test and deployment.

Yes, H5 page production is an important implementation method for front-end development, involving core technologies such as HTML, CSS and JavaScript. Developers build dynamic and powerful H5 pages by cleverly combining these technologies, such as using the <canvas> tag to draw graphics or using JavaScript to control interaction behavior.
