开发者

Is there something like <img src=X> but for text, not using ajax (and avoid iframes)?

开发者 https://www.devze.com 2023-01-20 06:18 出处:网络
Essentially I have lots of small urls with parameters. a requirement is for users to be able to generate reports by coding their own htm开发者_如何学Cl page with their own layout. The reports won\'t b

Essentially I have lots of small urls with parameters. a requirement is for users to be able to generate reports by coding their own htm开发者_如何学Cl page with their own layout. The reports won't be dynamic so I don't want to use Ajax. Are iframes the only way?


AJAX doesn't require that the report be dynamic. You can go get the HTML and then set the innerHTML of a tag with the result. If there were a hypothetical tag like

 <remotediv src="..."></remotediv>

It would pretty much do the same thing as this.

I believe that javascript in the HTML set to innerHTML won't run -- which might be the desired effect.

0

精彩评论

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