Jump to content

Nova Linha dentro da textarea (IE)


J4m3s007
 Share

Recommended Posts

Eu tenho umas Checkbox que tiro e coloco o visto para escrever na Textarea, o que acontece é que devia dar enter "\n\n" e dá, só que só da no Firefox e não dá no Internet Explorer. Se alguém soubesse outro método agradecia.

<script type="text/javascript">

function addOptions() {

// apagar a caixa por omissão

document.getElementById( "download" ).innerHTML = "";

if (document.getElementById("rapidshare").checked)

  document.getElementById( "download" ).innerHTML += "Rapidshare:\n\n

  

\n\n"

if (document.getElementById("megaupload").checked)

  document.getElementById("download").innerHTML += "Megaupload:\n\n

  

\n\n"

 

if (document.getElementById("hotfile").checked)

  document.getElementById("download").innerHTML += "Hotfile:\n\n

  

\n\n"

 

if (document.getElementById("netload").checked)

  document.getElementById("download").innerHTML += "Netload:\n\n

  

\n\n"

if (document.getElementById("mediafire").checked)

  document.getElementById("download").innerHTML += "Mediafire:\n\n

  

\n\n"

if (document.getElementById("megashares").checked)

  document.getElementById("download").innerHTML += "Megashares:\n\n

  

\n\n"

if (document.getElementById("storage").checked)

  document.getElementById("download").innerHTML += "Storage:\n\n

  

\n\n"

 

if (document.getElementById("other").checked)

  document.getElementById("download").innerHTML += "Other:\n\n

  

\n\n"

}

</script>

<textarea id="download" name="links" cols="50" rows="10" disabled="disabled"></textarea>

Obrigado.  🙂

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.