erange Posted February 9, 2011 Report Share Posted February 9, 2011 здравствуйте! помогите пожалуйста с задачкой<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>Untitled</title> <script type="text/javascript"> function test() { with(document.forms.primer) { if(t1.value>1){t1_rsl="raz"} if(t2.value>1){t2_rsl="dva"} rsl.value=(t1_rsl+t2_rsl); } } </script></head><body><form name="primer"> <input name="t1" type="text"></br> <input name="t2" type="text"></br> <textarea name="rsl" cols="20" rows="5"></textarea></br> <input value="start" type="button" onClick="test();"></form></body></html>суть проблемы в том, что не получается сделать результаты т1 и т2 на разных строках в textarea. мучения с br ни к чему не привели.пасибо! Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted February 10, 2011 Report Share Posted February 10, 2011 <br> не поможет, нужен обычный перевод строки.rsl.value=(t1_rsl+ '\n' + t2_rsl); Quote Link to comment Share on other sites More sharing options...
0 erange Posted February 10, 2011 Author Report Share Posted February 10, 2011 спасибо! Quote Link to comment Share on other sites More sharing options...
Question
erange
здравствуйте! помогите пожалуйста с задачкой
суть проблемы в том, что не получается сделать результаты т1 и т2 на разных строках в textarea. мучения с br ни к чему не привели.
пасибо!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.