复选框AS3功能复选框、功能

由网友(青春无限坑i)分享简介:我有16个复选框,我需要了解哪些人被选中。有没有办法,可以做一个函数?我可以做他们,如果(),但它会的方式来长感谢您的帮助!I have 16 checkboxes and I need to see which of them was selected. Is there a function that can...

我有16个复选框,我需要了解哪些人被选中。有没有办法,可以做一个函数? 我可以做他们,如果(),但它会的方式来长感谢您的帮助!

I have 16 checkboxes and I need to see which of them was selected. Is there a function that can do that ? I am able to do them with if() but it will be way to long thanks for the help !!

推荐答案

把你的复选框中的数组,然后创建一个函数来遍历数组,看看哪一个方框选择(你可以用为每一个和如果)。所有选择的添加到一个新的数组,并以此作为该函数的返回值。

Put your checkboxes in an array, then create a function to iterate over the array and see which box was selected (you can use "for each" and "if"). Add all selected ones to a new array and use this as the function's return value.

阅读全文

相关推荐

最新文章