<script language="javascript">
var in =new DataInputStream(new BufferedInputStream(new FileInputStream("http://search.csdn.net/Expert/topic/2291/2291111.xml?temp=.8784296")));
var inbr = new BufferedReader( new InputStreamReader(in));
// The doubles written BEFORE the line of text
// read back correctly:
document.write(in.readDouble());
// Read the lines of text:
document.write(inbr.readLine());
document.write(inbr.readLine());
// Trying to read the doubles after the line
// produces an end-of-file exception:
document.write(in.readDouble());
</script>
这个代码在JS中不对吗?
var in =new DataInputStream(new BufferedInputStream(new FileInputStream("http://search.csdn.net/Expert/topic/2291/2291111.xml?temp=.8784296")));
var inbr = new BufferedReader( new InputStreamReader(in));
// The doubles written BEFORE the line of text
// read back correctly:
document.write(in.readDouble());
// Read the lines of text:
document.write(inbr.readLine());
document.write(inbr.readLine());
// Trying to read the doubles after the line
// produces an end-of-file exception:
document.write(in.readDouble());
</script>
这个代码在JS中不对吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货