function reurl()
{
var a=test();
var b='./project.do?method=delete&billno='+a;
// alert(b);
return b;
} <input type="button" value="删除" style="width:50px; height:40px;" onclick="javascript:window.open('<script>reurl()</script>','_self')"/>
为什么我在下面调用不到 js函数的路径。 请各位帮帮忙
{
var a=test();
var b='./project.do?method=delete&billno='+a;
// alert(b);
return b;
} <input type="button" value="删除" style="width:50px; height:40px;" onclick="javascript:window.open('<script>reurl()</script>','_self')"/>
为什么我在下面调用不到 js函数的路径。 请各位帮帮忙
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">或者var b='request.getContextPath()/...../project.do?method=delete&billno='+a;直接写成绝对路径
onclick="javascript:if(confirm('確定刪除此筆資訊信息嗎﹖'));else return false;window.location='Del_user.jsp'"
{
var a=test();
var b='<%=basePath%>/project.do?method=delete&billno='+a;
// alert(b);
return b;
}加上basepath试试
{
var a=test();
var b='./project.do?method=delete&billno='+a;
// alert(b);
return b;
}var a = test(); 这是什么function,有吗?
如果不行就是你reurl方法有错,try catch捕获下看看。
onclick="reurl()" 和这样不是一个意思么。
onclick="window.open('<script>javascript:reurl()</script>','_self')"