<script> function subString(str, len, hasDot) { var newLength = 0; var newStr = ""; var chineseRegex = /[^\x00-\xff]/g; var singleChar = ""; var strLength = str.replace(chineseRegex,"**").length; for(var i = 0;i < st
js生成随即字符串 /* *js生成随即字符串原来如此简单 *toString() radix argument must be between 2 and 36 */ function uuid() { return Math.random().toString(36).substring(3, 8) } //7rh32
Grails的ajax使用json格式返回,在js中构造字符串时若放入<g:link>标签,字符串构造就会错误 如下就会发生错误,导致回调函数无法执行 function show(obj){ var id=obj.value; $.post("rtstudent",{id:id}, function(data){ var datas=eval(data); var str=""; $.each(datas,function(i,st){ str+='&l