阵列流动性......? [英] Array streamability...?

查看:69
本文介绍了阵列流动性......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有< select>带有一组控件的列表,用于设置与< select>中每个项目相关的各种值

。到目前为止,我正在使用

分隔符将值连接起来,并将数据存储在每个项目的option.value中,

但这显然是不稳定的和非通用解决方案。 (如果

有人输入分隔字符怎么办?如果存储了一个树状结构,那么每个级别需要不同的分隔字符会怎么样?)


所以,因为实现相当于PHP的$

" serialize()/ unserialize()"所以有点单调乏味。功能从零开始 - 任何人看到一些代码

左右?


Joakim Braun

解决方案

Joakim Braun写道:

我有< select>列表中包含一系列控件,可以为< select>中的每个项目设置相关的各种值。到目前为止,我正在使用
分隔符将值连接起来,并将数据存储在每个项目的option.value中,但这显然是一个不稳定且非通用的解决方案。 [...]

因此,实现相当于PHP的
serialize()/ unserialize()将会有点单调乏味。功能从零开始 - 任何人都看到了一些代码




也许你正在寻找< news:40 ********** ****@PointedEars.de>。

PointedEars


Thomas''PointedEars''Lahn写道:

< - snip - >

也许您正在寻找< news:40 ************** @ PointedEars.de>。




也许你应该开始提供常用的URL?那个URL

对我没什么用。 Nada。

-

Randy

机会有利于准备好的心灵

comp.lang.javascript常见问题 - < a rel =nofollowhref =http://jibbering.com/faq/target =_ blank> http://jibbering.com/faq/


* Randy Webb *写道:

* Thomas''PointedEars''Lahn *写道:

也许你正在寻找< news:40 ** ************ @ PointedEars.de>。



也许你应该开始提供常用的URL?该网址对我没有任何帮助。 Nada。




尝试: http://www.google.com/groups?selm=40...PointedEars.de

-

Andrew Urquhart

- 常见问题: www.jibbering.com/faq/

- 存档: www.google.com/groups?q=comp.lang.javascript

- 我的回复地址无效,请参阅< a rel =nofollowhref =http://www.andrewu.co.uk/contact/target =_ blank> www.andrewu.co.uk/contact/


I have <select> lists with a bunch of controls to set various values related
to each item in the <select>. So far I''m concatenating the values with a
separator character and storing the data in the option.value of each item,
but that''s obviously an unstable and non-general purpose solution. (What if
someone enters the separation character? What if a tree-like structure is
stored, requiring a different separation character for each level?)

So, as it would be a bit tedious to implement the equivalent of PHP''s
"serialize()/unserialize()" functions from scratch - anyone seen some code
around?

Joakim Braun

解决方案

Joakim Braun wrote:

I have <select> lists with a bunch of controls to set various values related
to each item in the <select>. So far I''m concatenating the values with a
separator character and storing the data in the option.value of each item,
but that''s obviously an unstable and non-general purpose solution. [...]

So, as it would be a bit tedious to implement the equivalent of PHP''s
"serialize()/unserialize()" functions from scratch - anyone seen some code
around?



Maybe you are looking for <news:40**************@PointedEars.de>.
PointedEars


Thomas ''PointedEars'' Lahn wrote:

<--snip-->

Maybe you are looking for <news:40**************@PointedEars.de>.



And maybe you should start giving commonly accessible URL''s? That URL
does nothing for me. Nada.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/


*Randy Webb* wrote:

*Thomas ''PointedEars'' Lahn* wrote:

Maybe you are looking for <news:40**************@PointedEars.de>.



And maybe you should start giving commonly accessible URL''s? That URL
does nothing for me. Nada.



Try: http://www.google.com/groups?selm=40...PointedEars.de
--
Andrew Urquhart
- FAQ: www.jibbering.com/faq/
- Archive: www.google.com/groups?q=comp.lang.javascript
- My reply address is invalid, see www.andrewu.co.uk/contact/


这篇关于阵列流动性......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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