Code for joining strings in javascript .
Code For joining strings in javascript.
<html>
<head>
<script>
function fun1()
{
var str1;
str1=prompt("input first string:-")
var str2;
str2=prompt("input second string:-")
var srt3;
str3=prompt("input third string:-")
// alert("str1 : =" + str1);
//alert("str2 : =" + str2);
document.write("joined string="+str1.concat(str2,str3));
}
</script>
</head>
<body bgcolor="pink">
<h1>Join two string using concat()</h1>
<input type="button" onclick="fun1();" value="Concat two string">
</body>
</html>
No comments:
Post a Comment