e_a_23
جمعه 08 اردیبهشت 1391, 12:35 عصر
The escape() function encodes a string.
This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.
This function encodes special characters, with the exception of: * @ - _ + . /
با توجه به توضیحات بالا، چرا خروجی کد زیر به همراه علائمی چون %20 آمده؟آیا %20 رمز شده space است؟
پس علائم * @ - _ + . / کجا به کار می روند؟
<html>
<body>
<script type="text/javascript">
document.write(escape("Need tips? Visit W3Schools!"));
</script>
</body>
</html>
Result:
Need%20tips%3F%20Visit%20W3Schools%21
This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.
This function encodes special characters, with the exception of: * @ - _ + . /
با توجه به توضیحات بالا، چرا خروجی کد زیر به همراه علائمی چون %20 آمده؟آیا %20 رمز شده space است؟
پس علائم * @ - _ + . / کجا به کار می روند؟
<html>
<body>
<script type="text/javascript">
document.write(escape("Need tips? Visit W3Schools!"));
</script>
</body>
</html>
Result:
Need%20tips%3F%20Visit%20W3Schools%21