问题是这样的, 下面有个htm文件的源码, 先点提交按钮,然后点“获取IFrame内 容或者链接地址”按钮时,能够取到IFRAME里面的内容或者内容的链接地址(即: http://www.baidu.com/s?wd=mp3)就行。解决的话,马上充200元手机费。骗子 死。 本人QQ:32690738
HTM文件源码
<form action="http://www.baidu.com/s" target="ret">
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址">
<form>
<div>
<iframe id="ret" name="ret" height= "100%" width= "100%" frameborder= "1" scrolling= "auto"></iframe>
</div>
HTM文件源码
<form action="http://www.baidu.com/s" target="ret">
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址">
<form>
<div>
<iframe id="ret" name="ret" height= "100%" width= "100%" frameborder= "1" scrolling= "auto"></iframe>
</div>
解决方案 »
- 加载 XML 文件谷歌浏览器不兼容性问题
- 想要的效果:在第一个文本框输入字符后,在第二个同步显示,在第三个左右添加内容后同步显示。
- 求个正则表达式 224.0.0.0到239.255.255.255 ip地址限制在这个范围?
- 超链接中的href可以加脚本void吗
- 如何使用JS在同页面进行订制转换
- 内嵌框架<IFRAME>传值问题
- 我做了个更改表格 颜色的例子。可是不好用。希望各位高手指点。
- 在一个有框架的页面中,如何在一框架中调用另一框架中的javascript方法?
- 用javascript有没有简单的办法取得3天后的年月日,而不用进行闰年之类的判断
- 敲了一晚上!为什么我两个函数运行不起来?!主要是setInterval('timer()',100);setInterval('runClock()',100)
- js控制A标签样式问题,请教!
- 求助一个小问题
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址">
<form>
<div> =>
<form action="http://www.baidu.com/s" target="ret">
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址" onclick="getvalues()">
<form>
<div> <script type='text/javascript'>
function getvalues() {
var form = document.forms[0]
var val = form.action + "?wd=" + form.name.value;
}
</script>
刚才给你解答的时候没在意题目~~~!我笑的是你的题目如果为了小利来CSDN。我何必呢
请不要笑话人家。
我认为这是很好的表现。
有时候我急于某个功能的实现 也会以200羊悬赏,求热心人帮助,可是csdn的版主竟然痛下杀手~!!!
如果是跨域的话,我觉得还是用autoIT等自动化工具吧~~我之前做自动注册的时候也是用这个工具写的脚本
因为ajax也好,框架也好,安全问题是解决不了
我不要求谁谁谁的态度多好,你只要能叙述好需求,我在能力和时间允许的情况下帮助解决,但是如果需求描述的不清,还态度很……。
算了 这些问题说了不知道多少遍了。楼主的做法本身没有问题,比如我公司的网站曾经请人推广网站的时候也请过别人帮过忙,但是我希望在合适的地方做合适的事。如果我希望能够赚点外快,我可以去找私活,我何必耗这么多时间来CSDN免费答题呢。大家遇到的问题,能够帮助解决一方面是增加经验,另一方面能够帮助自己不生疏某些知识。
用小偷程序或转静态技术中的XTMLHTTP,来读取目标页,存入一个字串变量,再在字串变量里查找要找的内容就是了。
观望中!~ 解决问题 不带吵架滴 心平气和才好 楼主的问题! 不懂! 嘿嘿!~ 现在极力的补充各种js知识! 尤其是jquery
2、用C#在后台得到你要的内容
private static string GetPage(string url)
{
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
Stream stream = webResponse.GetResponseStream();
StreamReader reader = new StreamReader(stream, System.Text.Encoding.GetEncoding("GB2312"));
//整个页面内容
string content = reader.ReadToEnd();
return content;
}
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
using System.Net;
using System.Collections.Generic;public partial class Demo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }
private static string GetPage(string url)
{
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
Stream stream = webResponse.GetResponseStream();
StreamReader reader = new StreamReader(stream, System.Text.Encoding.GetEncoding("GB2312"));
//整个页面内容
string content = reader.ReadToEnd();
return content;
}
protected void GetContect_Click(object sender, EventArgs e)
{
txt_Contect.InnerHtml=GetPage("http://www.baidu.com/s?wd=mp3");
}
}
单击事件可以得到页面的源代码
if(isset($_GET['url'])){
if(isset($_GET['wd'])){
$url = $_GET['url'].'?wd='.$_GET['wd'];
$fp = @fopen($url, "r") or die("超时");
$fcontents = file_get_contents($url);//所截获的内容
}
}
?>
<form action="weatherreport1.php" target="ret">
<input type="text" name="url" value = "http://www.baidu.com/s" />
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址">
</form>
<div>
<iframe id="ret" name="ret" height= "100%" width= "100%" frameborder= "1" scrolling= "auto"></iframe>
</div>php倒是容易获得内容
<head>
<script>
function getUrl(){
alert(document.getElementById("ret").getAttribute("src"));
}
</script>
</head>
<body>
<form action="http://www.baidu.com/s" target="ret">
<input name="wd" value="mp3"><br>
<input type="submit" value="提交">
<input type="button" value="获取IFRAME的内容或者链接地址" onclick="getUrl()">
<form>
<div>
<iframe id="ret" name="ret" height= "100%" width= "100%" frameborder= "1" scrolling= "auto" src="aa.html"></iframe>
</div>
</body>
<html>
<input type="button" value="提交" onclick="postvalue()">
<input type="button" value="获取IFRAME的内容或者链接地址" onclick="geturl()">
<div>
<iframe id="ret" name="ret" height= "100%" width= "100%" frameborder= "1" scrolling= "auto"></iframe>
</div><script>
function postvalue()
{
document.getElementById("ret").src = "http://www.baidu.com/s?wd=" + document.getElementById("wd").value;
}
function geturl()
{
alert(document.getElementById("ret").src);
}
</script>已经测试成功,请结贴