zoukankan      html  css  js  c++  java
  • Jquery拆分以符号隔开的字符串


    $(".properCharater").each(function () {
    var j = 0;
    var properCharater = $(this).next("input").val();
    if (properCharater != null) {
    var properSplit = properCharater.split(",");
    for (var i = 0; i < properSplit.length - 1; i++) {
    if (properSplit[i] != null && properSplit[i] != '') {
    j++;
    $(this).append("<span>" + properSplit[i] + "</span>");
    $(this).append(" ");
    }
    if (j == 3) {
    break;
    }
    }
    }
    })

  • 相关阅读:
    Java's Volatile Keyword
    reflection
    Spring
    Stack
    Set
    Vector & ArrayList
    CreateFileDemo
    session原理
    multithreadingDemo
    REST风格
  • 原文地址:https://www.cnblogs.com/zhangyong0908/p/9409003.html
Copyright © 2011-2022 走看看