jQuery会话-动态变量命名 [英] jquery session - dynamic variable naming

查看:125
本文介绍了jQuery会话-动态变量命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里只是一个问题. 我正在使用jquery,css做基于Web的应用程序的UI. 有一个购物车,我想将选定的项目存储在会话中,我使用了jquery.session插件. 例如var $.session("var1","item1");

just having a problem here. i'm doing the UI of a web-based app using jquery, css. there's a shopping a cart, and i want to store the selected items in the session, i used jquery.session plugin. e.g. var $.session("var1","item1");

我想要的是将项目动态存储到动态命名的变量中. 我该怎么办?

What i want is to dynamically store items into dynamically named variables. how could i do that?

谢谢.

推荐答案

如果有购物车,则该数据应由服务器端脚本语言(如PHP)处理.我假设最后他们将通过信用卡收取费用吗?这种数据需要安全.

If there's a shopping cart, that data should be handled by a server side scripting language like PHP. I'm assuming at the end they will be charged via credit card? This kind of data needs to be secure.

此外,这是功能的很大一部分,可以通过可关闭的非安全客户端语言(例如JS)来处理.

In addition, that's a pretty big part of functionality to be handled by a non-secure client-side language like JS that can be turned off.

将来需要考虑的事情.

这篇关于jQuery会话-动态变量命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆