Javascript: Form filling
Hello i have this form filling javascript:
function onLine(code,nn)
{
document.writeform.bericht.value+=code;
document.writeform.bericht.focus();
document.writeform.nickname.value+=nn;
write1();
}
Is this correct? Especially i want to know if i did
function onLine(code,nn)
(2 different values)
correct.
Can someone say so?
EDIT: if it is good, is this a good way of calling it:
...
onClick="onLi开发者_运维百科ne('Hello,MyThing');"
...
Or is this wrong? (which i think because it gave me script errors.)
Your function setup is correct, however the way you call it is incorrect. You need to seperate out your two strings.
...
onClick="onLine('Hello','MyThing');"
...
精彩评论