maybe this is very basic, but without knowledge I find it difficult
var thisString; function replace() {
thisString = document.colongan.colong.value;
thisString = thisString = thisString.replace(/1/g,"we \n friends");
document.colongan.colongin.value=thisString ;};
results obtained :
we
friends
if I give a second command like this :
var thisString; function replace() {
thisString = document.colongan.colong.value;
thisString = thisString = thisString.replace(/1/g,"we \n friends");
thisString = thisString = thisString.replace(/2/g," here \n forever");
document.colongan.colongin.value=thisString ;};
how to get results :
we here
friends forever
maybe the kindheartedly want to explain