RT
解决方案 »
- 各位我弄了个简单的关闭DIV代码,因为我要用多个我这样写太累了,请教各位能不能简化一下?
- 数组存储DOM节点对象
- 能不能用js控制最小化的浏览器窗口桔黄闪动提示新信息。
- 图片和超链接在一起怎样能使window.event.srcElement.tagName=a
- 怎样限定DIV拖动的范围,求高手帮忙,在线等~~~万分感谢
- 如何先history.go(-2) 然后刷新该窗口呢? ----挑战性问题 *^_^*
- 如何将变量的值显示在表格中,
- 高分问一个控制图片大小的问题
- 将字符串中第i个字符删除?
- showModalDialog提交的问题,如何让其不出现新页面!!!
- 将mp4嵌入页面,并用javascript动态改变src的内容
- 请问智联招聘那些选择框用什么做的
var d1, id, title, subtitle, contents;
var str, start, end, tmp;
var IE = WScript.CreateObject("InternetExplorer.Application");
//IE.Visible = true;
IE.Width = 680; IE.Height = 660;
IE.Navigate("http://www.asahi.com/paper/front.html");
while(IE.busy) ;
while(IE.Document.readyState != "complete") ;str = IE.document.body.innerHTML;//get date
start = str.indexOf("<I>") + 3;
end = str.indexOf("</I>", 3);
d = new Date(str.substring(start, end));
d1 = d.getYear() + "/" + d.getMonth() + "/" + d.getDate();
str = str.slice(end + 3);id = 1;
while((start = str.indexOf("<H3>")) != -1) {
end = str.indexOf("</H3>");
title = str.substring(start + 5, end); //title
tmp = end + 5;
if((end = title.indexOf("<BR>")) != -1) { //sub title
start = title.indexOf("-1>", end) + 3;
subtitle = title.slice(start, -7);
title = title.substring(0, end);
}
else
subtitle = "";
end = tmp;
str = str.slice(end);
//content
end = str.indexOf("<HR>");
contents = str.substring(0, end);
contents = RemoveTags(contents); //remove tag
str = str.slice(end + 4);
WScript.Echo("|" + d1 + "|" + (id++) + "|" + title
+ "|" + subtitle + "|" + contents + "^");
}function RemoveTags(str) {
var pos;
while(/<[^<]+>/.test(str)) {
/<[^<]+>/.exec(str);
str = str.substring(0, RegExp.index) + str.slice(RegExp.lastIndex);
}
return str;
}IE.Quit();