javascript function
Check button put on html
<script type="text/javascript">
function
dublicate(control){
var
tmipwords = document.getElementById(control).value;
var
arrTracemd = tmipwords.split(/,/);
var
arrNewTracemd = [];
var
seenTracemd = {};
for(var i=0;i<arrTracemd.length;i++)
{
if
(!seenTracemd[arrTracemd[i]])
{
seenTracemd[arrTracemd[i]]=true;
arrNewTracemd.push(arrTracemd[i]);
}
}
var
finalv=arrNewTracemd.join(",");
document.getElementById(control).value =
finalv;
}
</script>
Check button put on html
<asp:TextBox runat="server"
ID="txtSkillKeyWord"></asp:TextBox>
(Value should be separate with (,))
<input type="button"
onclick="dublicate('txtSkillKeyWord');"
value="Check
Duplicate">
No comments:
Post a Comment