Reputation: 106
I am new bie in node js can anyone tell how to transfer data from nodejs file to html file.... Like for example : If html page takes first name and last name as text and pass to node js.. ..then how can nodejs transfer full name(first name +last name) to same html file and show it there
Upvotes: 0
Views: 160
Reputation: 107
In javascript have string concatenate functionality
var firstName="Rahul"
var lastName="Dey"
name =firstName+" "+lastName // Rahul Dey
this is one approach
otherwise, You have to create an API in node js, which is taken the two value as a parameter and return a response of concatenated string. But it is not a good approach. So go with the first One.
Upvotes: 0
Reputation: 121
Why would you use Node.js for that? Just use Javascript to concatenate first name and last name.. I suggest you try to study more about what each technology is used for
Upvotes: 1