小编eva*_*ain的帖子

断言失败 - [UITableView _configureCellForDisplay:forIndexPath:]

谁能告诉我为什么会收到这个错误?

这是我的.m文件:

#import "ListaParticipantesViewController.h"
#import "Participantes.h"
#import "ModParticipantesViewController.h"

@implementation ListaParticipantesViewController

@synthesize dao;
@synthesize participantes;

- (void)viewDidLoad
{
    dao = [[ParticipantesDAO alloc] init];
    participantes = [[NSMutableArray alloc] init];
    participantes = [dao getDatos];
    [super viewDidLoad];

}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [participantes count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"celda";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    cell.textLabel.text = [[participantes objectAtIndex:[indexPath row]] valueForKey:@"nombre"];

    return cell;
}

#pragma mark - Table …
Run Code Online (Sandbox Code Playgroud)

xcode uitableview ios

10
推荐指数
2
解决办法
2万
查看次数

InnerHTML不工作:函数未定义

我正在尝试使用innerHTML,但每当我运行它并在Google Chrome上按F12时,我会收到此错误:

未捕获的ReferenceError:未定义fun

这是我的代码:

<script type="text/javascript">
    function fun(){
        document.getElementById('checklist').innerHTML =
        "<li> <input type="checkbox" > <label >Checkbox 1</label> </li>";
    }
</script>
    <p><input type="button" onclick="fun()" value="Add"/></p>

</div>
     <h3></h3>
</div>

 <div class="scroll" >
       <ul class="listacheck" id="checklist">

       </ul>
Run Code Online (Sandbox Code Playgroud)

我真的不明白为什么它说这个功能没有定义,如果有人能提供帮助,我会很高兴:)

javascript innerhtml

1
推荐指数
1
解决办法
1679
查看次数

HTML?关闭标记后不显示HTML

正如标题所说,在用于填充下拉列表的php脚本之后,页面中的其余html未显示(下拉列表正确显示).我在这里读到关于这个主题的其他问题,他们说这是因为php中的错误,但我检查了我的代码,没关系.这是我的代码:

<select>
    <?php 

        $host="localhost"; // Host name 
    $username="llenarDB"; // Mysql username 
    $password="abc45de89"; // Mysql password 
    $db_name="Administrador"; // Database name 
    $tbl_name="USUARIOS"; // Table name 

    $dbh= mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
    mysql_select_db("$db_name")or die("cannot select DB");

    $sql = mysql_query("SELECT Usuario FROM $tbl_name");
    while ($row = mysql_fetch_array($sql)){
    echo "<option value=\"owner1\">" . $row['Usuario'] . "</option>";
    }
    $tabla1= mysql_query($sql, $dbh) or die ("");

?>
</select>
Run Code Online (Sandbox Code Playgroud)

我哪里做错了 ?

提前致谢

html php drop-down-menu

0
推荐指数
1
解决办法
87
查看次数

标签 统计

drop-down-menu ×1

html ×1

innerhtml ×1

ios ×1

javascript ×1

php ×1

uitableview ×1

xcode ×1