总是要执行两条才成功,能不能一条执行就OK呢?javascript:window.location.href="http://localhost:8004/jasperserver/flow.html?_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples&ndefined=&standAlone=true&reportUnit=%2Freports%2Fsamples%2FTAX";
javascript:var txtStartDate = document.getElementById("START_DATE");var txtEndDate=document.getElementById("END_DATE");txtStartDate.value="2000-10-31";txtEndDate.value="2010-11-11";submitInputValues();void(0);

解决方案 »

  1.   

    javascript:window.location.href="http://localhost:8004/jasperserver/flow.html?_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples&ndefined=&standAlone=true&reportUnit=%2Freports%2Fsamples%2FTAX";window.onload=function(){var txtStartDate = document.getElementById("START_DATE");var txtEndDate=document.getElementById("END_DATE");txtStartDate.value="2000-10-31";txtEndDate.value="2010-11-11";submitInputValues();void(0);};
    试试
      

  2.   

    +
    用eval试试
    javascript:eval("alert(document.getElementById('id').value);");
    将你的js放到eval中