开发者

jQuery .load() function

开发者 https://www.devze.com 2023-02-18 21:56 出处:网络
I\'m generating table rows \"N\" times. If the user clicks \"add row\" buttons, I\'m adding rows 开发者_Go百科in the table.

I'm generating table rows "N" times. If the user clicks "add row" buttons, I'm adding rows 开发者_Go百科in the table.

So, I need to load one external file in one TD. How can I load an external page by class and not ID?

For example

$('.classname').load('ajax/help.html');


When you generate the td, you should have a reference (or be able to get one) and either load the file then. If you want to load the file later, give each td a generated, unique ID and then link a button or whatever to that td. If your scenario is different, amend your question and ill update my answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消