Cordova 在Phone gap中的某些字母后添加省略号

Cordova 在Phone gap中的某些字母后添加省略号,cordova,Cordova,我想在表视图中的某个字母后添加日食,我正在运行时创建表。您能建议我吗 一列我不想超过10个字符,所以我需要日食,我分享我的代码 没有工作 在车身负荷下,此功能 function GetDepartureStationDashboard() { document.getElementById('loadingImg').style.visibility = "visible"; var pl = new SOAPC

我想在表视图中的某个字母后添加日食,我正在运行时创建表。您能建议我吗 一列我不想超过10个字符,所以我需要日食,我分享我的代码

没有工作

在车身负荷下,此功能

 function GetDepartureStationDashboard()
        {      

            document.getElementById('loadingImg').style.visibility = "visible"; 
             var pl = new SOAPClientParameters();
             var params = getParams();
             var parameter1 = unescape(params["getStationCode"]);
             stationCode=parameter1;
             var parameter2 = unescape(params["getStationDesc"]).replace(/[+]/g," ");
             document.getElementById("headingcontent").innerHTML = parameter2;
             pl.add("parameter1", parameter1);
             SOAPClient.invoke(WSDLURL, "GetDepartureStationDashboard", pl, true, GetDepartureStationDashboard_callBack);
        }




function GetDepartureStationDashboard_callBack(r)
{
    document.getElementById('loadingImg').style.visibility = "hidden";
    var tbl = document.getElementById('mainBodyDivContent');
    //tbl.innerHTML = "";
    for (var i = 0; i <r.length-1; i++) {
        var tr = document.createElement('tr');
        tr.setAttribute('id', i);
        (function(id) {
            tr.onclick = function() {
                if(myScroll.isScrolling) {return;}
//window.clearTimeout(myTimedCall);
//window.clearInterval(myTimedCall);
         window.location.href="route.html?RID="+r[id].RID+"&StationCode="+stationCode;
            };
        }(i));

        var td1 = document.createElement('td');
        td1.setAttribute('width', '10%');
        td1.setAttribute("align","center");
        td1.innerHTML = r[i].platformNo;;

        var td2 = document.createElement('td');
        td2.setAttribute('width', '10%');
        td2.setAttribute("align","center");
        td2.innerHTML = r[i].schDepart;


        var td3 = document.createElement('td');
        td3.setAttribute('width', '5%');
        td3.setAttribute("align","center");
        td3.innerHTML ="-";

        var td4 = document.createElement('td');
        td4.setAttribute('width', '10%');
        td4.setAttribute("align","center");
        td4.innerHTML =r[i].destSchArrival;
        **************No dot come if word is bigger******
        var td5 = document.createElement('td');
        td5.setAttribute('width', '10%');
        td5.setAttribute("align","center");
        td5.setAttribute('style', 'text-overflow: ellipsis;');
        td5.setAttribute('style', 'overflow: hidden;');
        td5.setAttribute('style', 'white-space: nowrap;');
        td5.innerHTML = r[i].stationName;


        var td6 = document.createElement('td');
        td6.setAttribute('width', '15%');
        td6.setAttribute("align","center");
        td6.setAttribute('style', 'text-overflow: ellipsis;');
        td6.innerHTML =" (" + r[i].crsCode + ")" ;;

        var td7 = document.createElement('td');
        td7.setAttribute('width', '20%');
        td7.setAttribute("align","center");

        var td8 = document.createElement('td');
        td8.setAttribute('width', '20%');
        td8.setAttribute("align","center");
        td8.setAttribute('style', 'text-overflow: ellipsis;');
            if(r[i].schDepart == r[i].expDepart)
    {
        td7.innerHTML = "<img src=\"images/correct-icon.png\" width=\"20\" height=\"20\" />";
        td8.innerHTML="";
    }
    else 
    {
        td7.innerHTML = "<img src=\"images/error.png\" width=\"20\" height=\"20\" />";
        td8.innerHTML=r[i].expDepart;
    }

        tr.appendChild(td1);
        tr.appendChild(td2);
        tr.appendChild(td3);
        tr.appendChild(td4);
        tr.appendChild(td5);
        tr.appendChild(td6);
        tr.appendChild(td7);
        tr.appendChild(td8);


        tbl.appendChild(tr);
    }
函数GetDepartureStationDashboard() { document.getElementById('loadingImg').style.visibility=“visible”; var pl=新的SOAPClientParameters(); var params=getParams(); var参数1=unescape(参数[“getStationCode]”); stationCode=参数1; var parameter2=unescape(params[“getStationDesc”])。替换(/[+]/g,”); document.getElementById(“headingcontent”).innerHTML=参数2; pl.add(“参数1”,参数1); 调用(WSDLURL,“GetDepartureStationDashboard”,pl,true,GetDepartureStationDashboard\u回调); } 函数GetDepartureStationDashboard\u回调(r) { document.getElementById('loadingImg').style.visibility=“hidden”; var tbl=document.getElementById('mainBodyDivContent'); //tbl.innerHTML=“”;
对于(var i=0;i您需要使用
文本溢出:省略号
,以了解您正在尝试执行的操作。请查看此处或搜索“溢出省略号”以了解更多示例

不起作用……。如果单词较大,则不显示点。。