|
- function strtopic(data) {
- var html = "";
- var html1 = "";
- var obj = Array.prototype.slice.call(data.toString(), 0);
- if (obj.length < 4) {
- if (obj.length == 1) {
- for (i = 0; i < obj.length; i++) {
- var num = obj[i];
- html = numtopic(num);
- html1 = '<img src="/css/numberPNG/number0.png"/><img src="/css/numberPNG/number0.png"/><img src="/css/numberPNG/number0.png"/>';
- }
- } else if (obj.length = 2) {
- for (i = 0; i < obj.length; i++) {
- var num = obj[i];
- html = numtopic(num);
- html1 = '<img src="/css/numberPNG/number0.png"/><img src="/css/numberPNG/number0.png"/>';
- }
- } else if (obj.length = 3) {
- for (i = 0; i < obj.length; i++) {
- var num = obj[i];
- html = numtopic(num);
- html1 = '<img src="/css/numberPNG/number0.png"/>';
- }
- }
- }
- else {
- for (i = 0; i < obj.length; i++) {
- var num = obj[i];
- html = numtopic(num);
- }
- }
- return html1 + html;
- }
- function numtopic(num) {
- var html = "";
- if (num == 0) {
- html += '<img src="/css/numberPNG/number0.png"/>';
- }
- else if (num == 1) {
- html += '<img src="/css/numberPNG/number1.png"/>';
- } else if (num == 2) {
- html += '<img src="/css/numberPNG/number2.png"/>';
- }
- else if (num == 3) {
- html += '<img src="/css/numberPNG/number3.png"/>';
- }
- else if (num == 4) {
- html += '<img src="/css/numberPNG/number4.png"/>';
- }
- else if (num == 5) {
- html += '<img src="/css/numberPNG/number5.png"/>';
- }
- else if (num == 6) {
- html += '<img src="/css/numberPNG/number6.png"/>';
- }
- else if (num == 7) {
- html += '<img src="/css/numberPNG/number7.png"/>';
- }
- else if (num == 8) {
- html += '<img src="/css/numberPNG/number8.png"/>';
- }
- else if (num == 9) {
- html += '<img src="/css/numberPNG/number9.png"/>';
- }
- return html;
- }
复制代码 |
|