Important Notice: We're experiencing email notification issues. If you've posted a question in the community forums recently, please check your profile manually for responses while we're working to fix this.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How can I refer to a filename with a # in it (e.g. A#.png)? Note: "./A#.png" doesn't work.

  • 3 답장
  • 3 이 문제를 만남
  • 2 보기
  • 최종 답변자: cor-el

more options

Is there a way to get Firefox to load a file when the file name includes the character "#".

I use #'s in filename's to represent musical key signatures, and want to continue to do so.

I've tried using "& # 35 ;" (without the intervening spaces) in place of the #'s but this doesn't work.

Neither of the following file references work with FireFox (both work with IE) ...

   ... src="./A& # 35 ;.png" ...       <=  (without the intervening spaces)

   ... src="./A#.png" ...
Is there a way to get Firefox to load a file when the file name includes the character "#". I use #'s in filename's to represent musical key signatures, and want to continue to do so. I've tried using "& # 35 ;" (without the intervening spaces) in place of the #'s but this doesn't work. Neither of the following file references work with FireFox (both work with IE) ... ... src="./A& # 35 ;.png" ... <= (without the intervening spaces) ... src="./A#.png" ...

글쓴이 JimBayne 수정일시

선택된 해결법

The hash (#) is used to specify an anchor name or id in the file.
You need to escape such characters if they are part of the name: A%23.png

javascript:var p='%s';do;while(p=prompt(escape(p),p));
문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (3)

more options

선택된 해결법

The hash (#) is used to specify an anchor name or id in the file.
You need to escape such characters if they are part of the name: A%23.png

javascript:var p='%s';do;while(p=prompt(escape(p),p));
more options

Many thanks cor-el! That works perfectly.

more options

You're welcome.

You may also need to use encodeURIComponent in some cases:

javascript:var p='%s';do;while(p=prompt(encodeURIComponent(p),p));

글쓴이 cor-el 수정일시