("Li ");List. Add ("orange ");List. Add ("Mango ");List. Add ("apple ");List. Add ("banana ");Return list;}}
In actual use, you can sort data by fields in the database.
The following is the jquery code:
The Code is as follows:
// Move the user-selected role// Setname: name of the list to be removed from the data getname: name of the list to be moved into the dataFunction move (setname, getname){Var size = $ ("#" + setname + "option"). size ();Var selsize = $ ("#" + setname + "option: se
jquery code:Code // move the user-selected role
// Setname: name of the list to be removed from the data getname: name of the list to be moved into the data
Function move (setname, getname)
{
Var size = $ ("#" + setname + "option"). size ();
Var selsize = $ ("#" + setname + "option: selected"). size ();
If (size> 0 selsize> 0)
{
$. Each ($ ("#" + setname + "option: selected"), function (id, own ){
Var text = $ (own). text ();
Var tag = $ (own). attr ("tag ");
$ ("#" + Getname). prepend ("$ (Ow
("tag");$ ("#" +getname). Prepend ("$ (Own). Remove ();$ ("#" +setname+ ""). Children ("Option:first"). attr ("selected", true);});}Reorder$.each ($ ("#" +getname+ "option"), function (Id,own) {Orderrole (GetName);});}Sort role list by first letterfunction Orderrole (listname){var size=$ ("#" +listname+ "option"). Size ();var one=$ ("#" +listname+ "Option:first-child");if (size>0){var text=$ (one). text ();var tag=parseint ($ (one). attr ("tag"));All elements under the first value in the Loop l
in the database when actually used
Here's the jquery code:
Copy Code code as follows:
Mobile User-selected roles
SetName: List name to move out of data getname: List name to move data into
function Move (setname,getname)
{
var size=$ ("#" +setname+ "option"). Size ();
var selsize=$ ("#" +setname+ "option:selected"). Size ();
if (size>0selsize>0)
{
$.each ($ ("#" +setname+ "option:selected"), function (Id,own) {
var text=$ (Own). text ();
var tag=$ (Own). attr ("tag");
follows: // move the user-selected role
// Setname: name of the list to be removed from the data getname: name of the list to be moved into the data
Function move (setname, getname)
{
VaR size = $ ("#" + setname + "option"). Size ();
VaR selsize = $ ("#" + setname + "option: Selected"). Size ();
If (size> 0 selsize> 0)
{
$. Each ($ ("#" + setname + "option: Selected"), function (ID, own ){
VaR text = $ (own). Text ();
VaR tag = $ (own). ATTR ("tag ");
$ ("#" + Getname). prepend ("$ (Own). Remo
is as follows: // move the user-selected role// Setname: name of the list to be removed from the data getname: name of the list to be moved into the dataFunction move (setname, getname){VaR size = $ ("#" + setname + "option"). Size ();VaR selsize = $ ("#" + setname + "option: Selected"). Size ();If (size> 0 selsize> 0){$. Each ($ ("#" + setname + "option: Selected"), function (ID, own ){VaR text = $ (own). Text ();VaR tag = $ (own). ATTR ("tag ");$ ("#" + Getname). prepend ("$ (Own). Remove ()
the database when actually used
Here's the jquery code:
Copy Code code as follows:
Mobile User-selected roles
SetName: List name to move out of data getname: List name to move data into
function Move (setname,getname)
{
var size=$ ("#" +setname+ "option"). Size ();
var selsize=$ ("#" +setname+ "option:selected"). Size ();
if (size>0selsize>0)
{
$.each ($ ("#" +setname+ "option:selected"), function (Id,own) {
var text=$ (Own). text ();
var tag=$ (Own). attr ("tag");
$ (
In 1999, Bill Gates published his book, "Future speed-digital systems and new business thinking", "[email protected]," the velocity of thought ". In the book, Bill Gates made 15 bold predictions about the future. These predictions seem bold and unreasonable in the year, but as business student Markus Kirjonen in his blog, Gates seems to have "astonishing foresight".The most: price comparison website"The automatic price-to-service will be derived and developed," Gates predicts. This service allow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.