2012-11-19 68 views

回答

1

您的代碼工作對我來說,如果我從截圖文件名刪除url。我換成:

this.capture(savePath + "/"+ url + breakpoints[currentBreakpoint - 1][0] + ".png"); 

有:

this.capture(savePath + "/" + breakpoints[currentBreakpoint - 1][0] + ".png"); 

,並得到了3個文件的不同分辨率。

看來你需要正確地轉義url,然後才能使用它作爲文件名的一部分。