本文发表在 rolia.net 枫下论坛这样一段文字(body)
Now, what if you want to do this directly from JavaScript? You may not want a URL, but instead may want to pop up a mail window if a user clicks a button (like the Test URL button above or the Mail Window Test button below). In that case, you could use code similar to that shown in Listing 1.
编码后应该是这样escape(body):
Now%2C%20what%20if%20you%20want%20to%20do%20this%20directly%20from%20JavaScript%3F%20You%20may%20not%20want%20a%20URL%2C%20but%20instead%20may%20want%20to%20pop%20up%20a%20mail%20window%20if%20a%20user%20clicks%20a%20button%20%28like%20the%20Test%20URL%20button%20above%20or%20the%20Mail%20Window%20Test%20button%20below%29.%20In%20that%20case%2C%20you%20could%20use%20code%20similar%20to%20that%20shown%20in%20Listing%201.%20%0D%0A%0D%0A
或者你把下面的东西直接输入到IE的地址栏里运行(把email地址改一下)
mailto:test@com.com?Subject=Test&Body=Now%2C%20what%20if%20you%20want%20to%20do%20this%20directly%20from%20JavaScript%3F%20You%20may%20not%20want%20a%20URL%2C%20but%20instead%20may%20want%20to%20pop%20up%20a%20mail%20window%20if%20a%20user%20clicks%20a%20button%20%28like%20the%20Test%20URL%20button%20above%20or%20the%20Mail%20Window%20Test%20button%20below%29.%20In%20that%20case%2C%20you%20could%20use%20code%20similar%20to%20that%20shown%20in%20Listing%201.%20%0D%0A%0D%0A更多精彩文章及讨论,请光临枫下论坛 rolia.net
Now, what if you want to do this directly from JavaScript? You may not want a URL, but instead may want to pop up a mail window if a user clicks a button (like the Test URL button above or the Mail Window Test button below). In that case, you could use code similar to that shown in Listing 1.
编码后应该是这样escape(body):
Now%2C%20what%20if%20you%20want%20to%20do%20this%20directly%20from%20JavaScript%3F%20You%20may%20not%20want%20a%20URL%2C%20but%20instead%20may%20want%20to%20pop%20up%20a%20mail%20window%20if%20a%20user%20clicks%20a%20button%20%28like%20the%20Test%20URL%20button%20above%20or%20the%20Mail%20Window%20Test%20button%20below%29.%20In%20that%20case%2C%20you%20could%20use%20code%20similar%20to%20that%20shown%20in%20Listing%201.%20%0D%0A%0D%0A
或者你把下面的东西直接输入到IE的地址栏里运行(把email地址改一下)
mailto:test@com.com?Subject=Test&Body=Now%2C%20what%20if%20you%20want%20to%20do%20this%20directly%20from%20JavaScript%3F%20You%20may%20not%20want%20a%20URL%2C%20but%20instead%20may%20want%20to%20pop%20up%20a%20mail%20window%20if%20a%20user%20clicks%20a%20button%20%28like%20the%20Test%20URL%20button%20above%20or%20the%20Mail%20Window%20Test%20button%20below%29.%20In%20that%20case%2C%20you%20could%20use%20code%20similar%20to%20that%20shown%20in%20Listing%201.%20%0D%0A%0D%0A更多精彩文章及讨论,请光临枫下论坛 rolia.net