开发者

Place cursor at the end of an iframe content

开发者 https://www.devze.com 2023-03-17 03:30 出处:网络
I have an iframe in which I want to add images dynamically with php. Each image should be followed by a line break and so that the next image added to be added in the following row. The line break is

I have an iframe in which I want to add images dynamically with php. Each image should be followed by a line break and so that the next image added to be added in the following row. The line break is added but the focus stays a开发者_开发知识库lways at the beginning of the iframe content (when it should have been at the end of the newly added <br> tag). Is there a way to move the cursor to the end of the content of the iframe with Javascript which works with all browsers?


What about setting scrollTop or calling scrollTo?

0

精彩评论

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