![]() |
# 1 |
הוסטסניון
|
[JS] שאלה..
איך מחליפים מילים ב JS
הכוונה זה שאם יש לי את המילה "אבגדה" ואני רוצה להחליף במילה הזאתי את "אב" ל "אאאא" אז הפלט יהיה "אאאאגדה" תודה לעוזרים ![]() עריכה : יש לי עוד שאלה כתבתי את הדבר הזא HTML קוד:
function text2color(text,c){ myform.text.value = "<font color="+c+">"+text+"</font>"; } HTML קוד:
<form action='index.php' method='post' name='myform'> <input type='button' name="color" onclick="text2color(myform.text.value,'red');" /> <textarea cols='80' rows='10' name='text'> טקסט </textarea> </form> HTML קוד:
<font color=red>טקסט</font> שאני יסמן את מהמילה טקסט רק את סט וכאשר אני ילחץ על הכפתור הפלא יהיה: HTML קוד:
טק<font color=red>סט</font>
__________________
אימיל \ מסן : amirs91 [at] gmail.com Last edited by amirs_5; 07-08-06 at 19:49.. |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|