如果让js单独完成这是不可能的,但是可以在js里面添加这代码是行得通的,
好像这样
function ispop()
{ var name="<?echo$name?>";
var dd="<?if(!is_file(‘ds.txt')){return '';}?>";
  var pp="<?$array1=file(ds.txt');$attay1=explode('||',$array1[0]);echo$attay1[0];?>";
if (pp!='0') {
 noBorderWin('test.php?name='+name,'126','310','#000000','#333333','#CCCCCC','ok!','no');
 top.history.go(0)
}
if(pp==0){
top.history.go(0)
}
 }
</script>
这只是一个例子,是对文本读的操作,不单独执行,你可以参照一下其中的使用方法,