CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 3975|Reply: 3

Forward slash does not appear in javascript form

[Copy link]
Ismail This user has been deleted
Post time 17-6-2004 12:12 PM | Show all posts |Read mode
I am making a javascript form to make the codes for my
javascript function but when I put the forward slash "\" in
the form processor function, the slash does not appear in
the result form.

it is supposed to appear like this:
document.write(\'write\',\'the\',\'code\',\'beautifully\',\'and\',\'nicely\');

but instead the result is this:
document.write('write','the','code','beautifully','and','nicely');

Can anything be done to make the slash appear?

below is the javascript form and function

  1. <script>
  2. function makeCode(){
  3. kod="document.write(\'"+codemaker.taitel.value+"\',\'"+codemaker.imej.value+"\',\'"+codemaker.komen.value+"\',\'"+codemaker.sitename.value
  4.                                 +"\',\'"+codemaker.link.value+"\',\'"+codemaker.taget.value+"\');";
  5. codemaker.suggestions.value=kod;
  6. }
  7. </script>

  8. <div>
  9. <form name="codemaker"></div><div>
  10. title <INPUT TYPE="TEXT" NAME="taitel" value="write" SIZE="50"> </div><div>
  11. image <INPUT TYPE="TEXT" NAME="imej" value="the" SIZE="50"> </div><div>
  12. comment <INPUT TYPE="TEXT" NAME="komen" value="code" SIZE="50"> </div><div>
  13. site name <INPUT TYPE="TEXT" NAME="sitename" value="beautifully" SIZE="50"></div><div>
  14. site link <INPUT TYPE="TEXT" NAME="link" value="and" SIZE="50"> </div><div>
  15. window name <INPUT TYPE="TEXT" NAME="taget" value="nicely" SIZE="50"> </div><div>
  16. <INPUT TYPE="SUBMIT" NAME="name" VALUE="get your code" onclick="makeCode();return false"></div><div>
  17.   <TEXTAREA NAME="suggestions" ROWS="5" COLS="70"></TEXTAREA>
  18. </form></div>
Copy the Code


this topic has been posted here too

http://webmastercool.com/forum/i ... &st=0#entry2789

[ Last edited by Sarah_Radzi on 17-6-2004 at 11:25 PM ]
Reply

Use magic Report


ADVERTISEMENT


Ismail This user has been deleted
 Author| Post time 17-6-2004 12:16 PM | Show all posts
Reply

Use magic Report

Post time 18-6-2004 02:39 AM | Show all posts
kalau nak print forward slash .. letak dua forward slash

document.write("\\a\\b\\c\\d");

[ Last edited by Sarah_Radzi on 17-6-2004 at 08:40 PM ]
Reply

Use magic Report

Ismail This user has been deleted
 Author| Post time 20-6-2004 03:08 PM | Show all posts
menjadilah!

terimakasih sarah!

:solute::solute::solute::solute::solute::solute::solute::solute::solute::solute::solute:
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

28-12-2024 10:27 PM GMT+8 , Processed in 0.056891 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list