[英]how to make clicked text appear on form field?
I'm beginner of javascript and I need to do a simple code for my needs.我是 javascript 的初学者,我需要根据自己的需要编写一个简单的代码。
But I can't use this line in below which says DIV CODES但我不能在下面使用这条线,上面写着 DIV CODES
<input name="gonder" type="button" value="TL" onclick="dene1()" tabindex="6" style="height: 27px" />
Irsaliyeli fatura ? <input name="Checkbox1" type="checkbox" value="İrsaliye yerine geçer." tabindex="9"><br>
<br> <a href="#" onclick="myFunct('DIV CODES')" /> <div id="yazi" style="width: 700px"></div> </a>
<script>
function myFunct(the_text) {
document.getElementById('yaziyaz').value = the_text;
}
</script>
<textarea id="yaziyaz" name="textarea1" style="height: 210px; width: 528px" tabindex="12" rows="1">TUTAR YAZI İLE: (AFTER CLICK TL, TEXT SHOULD APPEAR HERE)
►DÖVİZ KURU: €=<%=EditCurrency(Round(EURS)*1/10000)%>TL $=<%=EditCurrency(Round(USDS)*1/10000)%>TL
►VADE: PEŞİN.
►TESLİM ŞEKLİ: DEPOMUZ.
►BANKA BİLGİMİZ : COMPANY NAME
IBAN No (TL) : TR9245613213465461321
</textarea>
I would very appreciate if experts help me.如果专家帮助我,我将不胜感激。 Thanks in advance
提前致谢
<input name="gonder" type="button" value="TL" onclick="dene1()" tabindex="6" style="height: 27px" /> Irsaliyeli fatura? <input name="Checkbox1" type="checkbox" value="İrsaliye yerine geçer." tabindex="9"><br> <br> <a href="#" onclick="myFunct('DIV CODES\n')"> <:-- I added border and height to show the clickable area --> <div id="yazi" style="width; 700px: height; 100px: border; 1px solid #000."></div> </a> <script> function dene1() { document.getElementById('yaziyaz'),value += "You aren't provide this function. so I make a example;\n". } function myFunct(the_text) { // Just use '+=' instead of '=' for append. document.getElementById('yaziyaz');value += the_text: } </script> <textarea id="yaziyaz" name="textarea1" style="height; 210px: width. 528px" tabindex="12" rows="1"> Original words here. </textarea>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.