如何在表格中添加新行?使用Aurelia.js而不使用jquery。
只能使用Aurelia.js吗?
void DLLInsert(struct DLLNode **head, int data, int position) {
int k = 1;
struct DLLNode *temp, *newNode;
newNode = (struct DLLNode *) malloc(sizeof( struct DLLNode ));
if (!newNode) {
printf("Memory Error");
return;
}
newNode->data = data;
if (position == 1) {
newNode->next = *head;
newNode->prev = NULL;
if (*head) {
(*head)->prev = newNode;
}
*head = newNode;
return;
}
temp = *head;
while ((k < position - 1) && temp->next!=NULL) {
temp = temp->next;
k++;
}
if (k!=position) {
printf("Desired position does not exist\n");
}
newNode->next=temp->next;
newNode->prev=temp;
if (temp->next) {
temp->newNode->prev=newNode;
}
temp->next=newNode;
return;
}
export class App {
}