如何打开<此书签>进入表格?此书签>
谁能帮我做这个吗?我想把这个小书签:
javascript:try{s1=document.getElementsByTagName('body')[0].innerHTML.toString();s2=escape(s1.substr(s1.indexOf('flashvars.un'),128)+s1.substr(s1.indexOf('flashvars.title'), 128));location.href='http://somesite.something.com/index.html?input='+s2;}catch(err){location.href='http://somesite.something.com/index.html';}
变成一个表单,用户输入一个URL,然后单击提交以在放置表单的同一网页中“激活”小书签的功能。我问了几个人,但他们都说“这很棘手”……有人能做到吗?我需要完成此操作,但我有点迷失了,
谢谢你们;)
PS 任何类型的建议或方法都会有用。
Can anyone help me doing this? I want to turn this bookmarklet:
javascript:try{s1=document.getElementsByTagName('body')[0].innerHTML.toString();s2=escape(s1.substr(s1.indexOf('flashvars.un'),128)+s1.substr(s1.indexOf('flashvars.title'), 128));location.href='http://somesite.something.com/index.html?input='+s2;}catch(err){location.href='http://somesite.something.com/index.html';}
into a form, in a way that, the user inputs an URL and then click submit to "activate" bookmarklet's function in the same webpage the form is placed. I asked to a few people, but all they say is that "it is tricky" to do... Can anyone do it? I need this to be done and I'm kinda lost here,
Thank you guys ;)
P.S. Any kind of advice or HowTo will be useful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,您需要一个表单,用户可以在其中输入包含 Flash 影片的页面的 URL。然后某个进程提取 Flash 并将其全屏打开。
这是不可能的,除非您编写一个服务器进程,因为小书签在您所在页面的范围内运行,并且 pageA 上的表单无法在 pageB 范围内执行脚本
如果您使用 HTA(html 应用程序),您可以从中提取一些内容一个 iframe
If I understand you correctly, you want to have a form, where users enter a url of a page that has a flash movie. Then some process extracts the flash and opens it fullscreen.
That is not possible unless you write a server process since a bookmarklet runs in the scope of the page you are on and the form on pageA cannot execute a script in the scope of pageB
If you use HTA (html application) you COULD extract something from an iframe