a) 我有一个看起来像这样的 html 页面:
<html>
<head>
<title>Page Title</title>
</head>
<script type="text/javascript">
document.write('<FRAMESET cols="*, 300" border="0">');
document.write('<FRAME src="http://www.my-website.com" id="inner" name="inner" />');
document.write('<FRAME src="http://www.third-party-website" id="chatframe" name="chatframe" />');
document.write('<NOFRAMES><P>You must have a frames compatible browser to use Activa Live Chat</P></NOFRAMES>');
document.write('</FRAMESET>');
</script>
</html>
其中 my-website.com 框架是我可以完全访问的网站,而 third-party-website.com 是我无法访问的网站(它是一个聊天软件)。
b) 通常聊天会在弹出窗口中打开,但我们这样做是为了让它在页面右侧的框架中打开。
c) 聊天框架有一个“关闭”链接,用于结束聊天会话。它周围有一个 div:
<div class="close" id="close-chat">
d) 当单击“关闭”链接时,我还希望关闭聊天框,即重定向回“my-website.com”。
我尝试使用 jQuery .bind() 向 #close div 添加点击功能,但没有成功。
感谢任何有兴趣的人的帮助!