Home > front end >  Jquery with 3. The text () why there is an access to content is empty?
Jquery with 3. The text () why there is an access to content is empty?

Time:09-25

 







 
Var TDS=$(this). The parent (). The parent () prevAll ();
Var name=($(TDS [0]). The text ());
Var type=($(TDS) [1]. The text ());
Var price=($(TDS) [2]. The text ());
Alert (price);


$(this) is a label, the name and type can correct values, only price is empty
The name and type the background value is a string type, the price is double, but should be ok with this?

CodePudding user response:

CodePudding user response:

Debugging a look will know that this has a value not value

CodePudding user response:

The course is bound to the object. BTN - group on the label, directly obtained with respect to ok, so don't bother you

CodePudding user response:

refer to the second floor usecf response:
debug look at will know that this has a value not value


No value

CodePudding user response:

reference jio can reply: 3/f
bound to the course object. BTN - group labels, directly obtained with respect to ok, so don't bother you


I opened this button is a hidden modal dialog again assignment, tied to the row on how to use?

CodePudding user response:

 

$(' BTN - group ') on (' click ', 'a', function () {
Var course=$(this). The parent (' BTN - group ')
The console. The log (course)
})

CodePudding user response:

refer to 6th floor jio can reply:
 

$(' BTN - group ') on (' click ', 'a', function () {
Var course=$(this). The parent (' BTN - group ')
The console. The log (course)
})


How to take the inside of the course cost? Val ()? Sorry I am too food

CodePudding user response:

API to return to the course is what is what, you don't have to print? If is turned into a string with the course=JSON parse (course) into JSON. Values with the course. The name course. The type course. The price

CodePudding user response:

reference jio can reply on the eighth floor:
API to return to the course is what is what, you don't have to print? If it is turned into a string with the course.=JSON parse (course) into JSON. Values with the course. The name course. The type course. The price


Returns the object ah

CodePudding user response:

You pass this value where, check the source

CodePudding user response:

references 9 f Levent_ response:
returns the object!


//here is wrong, write less the row attributes
Var course=$(this). The parent (' BTN - group '). The attr () 'row'

CodePudding user response:

11 references jio can reply:
Quote: references 9 f Levent_ response:


Returns the object ah


//here is wrong, write less the row attributes
Var course=$(this). The parent (' BTN - group '). The attr (' row ')

After add course can apply to, but the name of these or take less than,

CodePudding user response:

The
references to the tenth floor usecf response:
you pass this value from which, check the source

The background object to the page, the page can display properly, but I use the text () can't get, and only this one take less than,

CodePudding user response:

What is the print API return

CodePudding user response:

On the 14th floor jio
references can reply:
what is the content of the print API return

The same is true of,

CodePudding user response:

Compile the template engine is the use? JSP?

CodePudding user response:

I don't think it should be $(TDS) [2], a direct TDS [2]. The text try ()

Var name=TDS [0]. The text ();
Var type=TDS [1]. The text ();
Var price=TDS [2]. The text ();

CodePudding user response:

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related