【发布时间】:2015-04-16 15:12:26
【问题描述】:
我正在尝试在 UIWebView 中创建动态复选框。我正在使用此代码:
NSMutableArray *array = [[NSMutableArray alloc]initWithObjects:@"Sudhaadagdudgdada",@"qwertyuiopo",@"asdfghjkl", nil];
for (int j = 0; j < array.count; j++)
{
NSString *html = [NSString stringWithFormat:@"<div id='check'></div><script> str=''; str += '<input type=\"checkbox\" name=\"one_'+i+'\" value=\"'+%@+'\" onclick=alert(this.value); />' document.getElementById(\"check\").innerHTML=str;</script>",[array objectAtIndex:j]];
[self.webview loadHTMLString:[NSString stringWithFormat:@"%@",html] baseURL:nil];
}
但 UIWebView 中没有复选框。请帮帮我。
【问题讨论】:
标签: javascript html ios objective-c uiwebview