|
@@ -425,3 +425,16 @@ function getUrlParam(name) { |
|
@@ -425,3 +425,16 @@ function getUrlParam(name) { |
425
|
if (r != null) return unescape(r[2]);
|
425
|
if (r != null) return unescape(r[2]);
|
426
|
return null; //返回参数值
|
426
|
return null; //返回参数值
|
427
|
}
|
427
|
}
|
|
|
428
|
+
|
|
|
429
|
+/**
|
|
|
430
|
+ * 跳转url转义
|
|
|
431
|
+ * @param str
|
|
|
432
|
+ * @returns {void|string|XML}
|
|
|
433
|
+ */
|
|
|
434
|
+function escape2Html(str) {
|
|
|
435
|
+ var arrEntities = {'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"'};
|
|
|
436
|
+ return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
|
|
|
437
|
+ return arrEntities[t];
|
|
|
438
|
+ });
|
|
|
439
|
+}
|
|
|
440
|
+ |