javascript - 移动页面A.html点击跳转B的页面,需要在B的页面填过的内容带给a.html。怎么做?
在填写银行卡信息页面中,点击分行跳转到选择分行页面。
在新选择分行页面点击 可以把这个值 传给原来的页面?
好难的样子,没做过。 具体是怎么做啊。
回复内容:
在填写银行卡信息页面中,点击分行跳转到选择分行页面。
在新选择分行页面点击 可以把这个值 传给原来的页面?
好难的样子,没做过。 具体是怎么做啊。
同意楼上,并且你这是移动端,跳转页面是很不推荐的,之前我的一个项目也是类似,我做之前参考了很多大厂的移动端解决方案,无一例外的都是采用了这种单页解决方案,都是把一个个逻辑放在了不同的层级,然后用按钮来影藏和显示,还可以加上一点css3,来达到翻页的效果,很不错呢,就是页面逻辑比较复杂,理清楚就好了,对了,你可以去看看 饿了们 怎么做的,还有,苏宁的做的最好,你去看看
本地存储不可以么?
做单页应用,B页面别用单独的页面,将B页面的功能在A页面用一个完全覆盖A页面的层来做,这样数据想怎么拿就怎么拿了,
楼上说的没错,做spa,挑选银行按钮点击了直接把第二个页面的布局放到一个覆盖全部页面的div,选择了之后用js获取值放到选择银行那块...
如果是两个不同的页面的话,可以采用跨文档消息传递吧
在B页面上 window.postMessage(data,"A页面URL");
在A页面上 window.onmessage = function (event){
<code>if(event.origin == "B页面URL"){ //处理event.data }</code>
}
get 不就行了
localStorage 应该可以
window.name可以传递两个页面间的数据
移动端 避免不必要的刷新页面 用弹出层(B) 填写完毕 下一步 隐藏(B) 然后使用JS获取(B)输入框的值
其实本质是一个页面 只不过是隐藏了而已
用 window.location.hash
不建议用localstorage 这玩意越少越好 建议用页面的叠加
可以不要做成页面跳转,b页面做成a页面的一个iframe,点击a页面的按钮,弹出iframe,b页面后选择支行执行函数parent.choose("支行名称"),在a页面定义一个choose(参数)函数。可以实现需求,优缺点就不比较了。

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











session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json file. 1) parse composer.json to obtain dependency information; 2) parse dependencies to form a dependency tree; 3) download and install dependencies from Packagist to the vendor directory; 4) generate composer.lock file to lock the dependency version to ensure team consistency and project maintainability.

Methods for configuring character sets and collations in MySQL include: 1. Setting the character sets and collations at the server level: SETNAMES'utf8'; SETCHARACTERSETutf8; SETCOLLATION_CONNECTION='utf8_general_ci'; 2. Create a database that uses specific character sets and collations: CREATEDATABASEexample_dbCHARACTERSETutf8COLLATEutf8_general_ci; 3. Specify character sets and collations when creating a table: CREATETABLEexample_table(idINT

Renaming a database in MySQL requires indirect methods. The steps are as follows: 1. Create a new database; 2. Use mysqldump to export the old database; 3. Import the data into the new database; 4. Delete the old database.

Implementing singleton pattern in C can ensure that there is only one instance of the class through static member variables and static member functions. The specific steps include: 1. Use a private constructor and delete the copy constructor and assignment operator to prevent external direct instantiation. 2. Provide a global access point through the static method getInstance to ensure that only one instance is created. 3. For thread safety, double check lock mode can be used. 4. Use smart pointers such as std::shared_ptr to avoid memory leakage. 5. For high-performance requirements, static local variables can be implemented. It should be noted that singleton pattern can lead to abuse of global state, and it is recommended to use it with caution and consider alternatives.
