向html表中添加行时Tianium webview崩溃
我的窗口中有带内联html的webview。它包含一个大约有10行的html表。当我尝试向表中再添加一行时,应用程序崩溃向html表中添加行时Tianium webview崩溃,webview,titanium,Webview,Titanium,我的窗口中有带内联html的webview。它包含一个大约有10行的html表。当我尝试向表中再添加一行时,应用程序崩溃 webView = Titanium.UI.createWebView({ scalesPageToFit:false, top:0, bottom:0 }); var html = '<html>'+ '<body>'+ '<table width="98
webView = Titanium.UI.createWebView({
scalesPageToFit:false,
top:0,
bottom:0
});
var html = '<html>'+
'<body>'+
'<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">'+
'<tr>'+
'<td align="left" height="25" colspan="2" style="color:#ba2424; font-size:14; font-weight:bold">Use RedAnar To:</td>'+
'</tr>'+
'<tr>'+
'<td width="10%" height="25"><img src="'+sc+'"></td>'+
'<td width="90%" height="25" style="color:#000; font-size:14; font-weight:bold">Store Card Data</td>'+
'</tr>'+
'<tr>'+
'<td width="10%" height="25"><img src="'+eo+'"></td>'+
'<td width="90%" height="25" style="color:#000; font-size:14; font-weight:bold">Explore Offers</td>'+
'</tr>'+
'<tr>'+
'<td width="10%" height="25"><img src="'+cl+'"></td>'+
'<td width="90%" height="25" style="color:#000; font-size:14; font-weight:bold">Capture Loyalty</td>'+
'</tr>'+
'<tr>'+
'<td width="10%" height="25"><img src="'+tp+'"></td>'+
'<td width="90%" height="25" style="color:#000; font-size:14; font-weight:bold">Track Points</td>'+
'</tr>'+
'<tr>'+
'<td width="10%" height="25"><img src="'+vb+'" valign="absmiddle"></td>'+
'<td width="90%" height="25" style="color:#000; font-size:14; font-weight:bold">View Balances</td>'+
'</tr>'+
'<tr>'+
'<td align="left" height="25" colspan="2" style="color:#ba2424; font-size:14; font-weight:bold">Card Description</td>'+
'</tr>'+
'<tr>'+
'<td align="left" height="20" colspan="2" style="color:#000; font-size:14; font-weight:normal">'+description+'</td>'+
'</tr>'+
'<tr>'+
'<td align="left" height="25" colspan="2" style="color:#ba2424; font-size:14; font-weight:bold">Highlights</td>'+
'</tr>'+
'<tr>'+
'<td align="left" height="20" colspan="2" style="color:#000; font-size:14; font-weight:normal">'+highlights+'</td>'+
'</tr>'+
'</table>'+
'</body>'+
'</html>';
webView.html = html;
webView=Titanium.UI.createWebView({
scalesPageToFit:false,
排名:0,
底部:0
});
var html=''+
''+
''+
''+
'使用RedAnar到:'+
''+
''+
''+
“存储卡数据”+
''+
''+
''+
“探索优惠”+
''+
''+
''+
“获取忠诚”+
''+
''+
''+
“跟踪点”+
''+
''+
''+
“查看余额”+
''+
''+
“卡片说明”+
''+
''+
''+说明+''中+
''+
''+
“亮点”+
''+
''+
''+高光+''+
''+
''+
''+
'';
webView.html=html;
如果我尝试在此之后再插入一行,应用程序将崩溃。有什么建议吗?我刚刚测试了你的代码,它很有效(不过我使用了你的变量作为文本,因为我不知道它们里面有什么) 我在末尾添加了以下行,它也起了作用:
'</tr>'+
'<tr>'+
'<td align="left" height="20" colspan="2" style="color:#000; font-size:14; font-weight:normal">'+"highlights"+'</td>'+
'</tr>'+
“”+
''+
“+”突出显示“+”+
''+
当它不起作用时,你会添加哪一行?当它崩溃时会出现什么错误?这是针对iPhone还是Android的?