이 코드는 내 Sharepoint 프로젝트의 C#에서 작성합니다. 잘 작동한다.C#의 자바 스크립트 문제
ClientScript.RegisterStartupScript(this.GetType(), "ale", "window.open('DownloadHandler.ashx?fileName=Error.log');", true);
그러나이 코드를 변경하면 더 이상 작동하지 않습니다.
ClientScript.RegisterStartupScript(this.GetType(), "ale", string.Format("window.open('DownloadHandler.ashx?fileName={0}')", "Error.log"), true);
코딩에 어떤 문제가 있습니까?
"더 이상 작동하지 않습니다."를 정의 하시겠습니까? –
잘 모르겠다.'window.open()'문장의 끝에'; '이 없다? –
@kevin javascript의 끝에서 누락 된 세미콜론 ?? – Nalaka526