Home > front end >  Look: want to add functionality, but where is the error code and I don't know were wrong
Look: want to add functionality, but where is the error code and I don't know were wrong

Time:09-19

CodePudding user response:

Your method name is addTab not add so can't find the add method

CodePudding user response:

Window. The onl oad=function () {}, all the inside of the var delete a try,
Look at the javascript variable scope

CodePudding user response:

 
Window. The onl oad=function () {
.
Var add=document. GetElementById (" tabadd ");
The add onclick=function () {
AddTab ();
}
}
Var addTab=function () {
.
};

CodePudding user response:

reference 3 floor sky waves reply:
 
Window. The onl oad=function () {
.
Var add=document. GetElementById (" tabadd ");
The add onclick=function () {
AddTab ();
}
}
Var addTab=function () {
.
};

You this console without error, but didn't realized after click add functionality

CodePudding user response:

Don't see you add in the matter of asynchronous onl oad and you bind the onclick below your onl oad haven't finished your add or null, lead to an error code on the onl oad are good
  • Related