<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>
<script type="text/javascript" src="reference.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
//what is name?,raghu,raja,raghu raja,raja raghu,none
//what is name?,Jayanthi,arathi,arathi Jayanthi,Jayanthi arathi,none
$(function () {
if (window.FileReader) {
$('#file1').on('change', function (e) {
var file = e.target.files[0];
var reader = new FileReader();
reader.onload = function (e) {
var csv = reader.result.split(',');
$('#textarea1').val(csv.join('\n'));
}
reader.readAsText(file);
});
} else {
console.log("no support");
}
});
</script>
<input type="file" id="file1" />
<textarea id="textarea1"></textarea>
<script type="text/javascript" src="reference.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
//what is name?,raghu,raja,raghu raja,raja raghu,none
//what is name?,Jayanthi,arathi,arathi Jayanthi,Jayanthi arathi,none
$(function () {
if (window.FileReader) {
$('#file1').on('change', function (e) {
var file = e.target.files[0];
var reader = new FileReader();
reader.onload = function (e) {
var csv = reader.result.split(',');
$('#textarea1').val(csv.join('\n'));
}
reader.readAsText(file);
});
} else {
console.log("no support");
}
});
</script>
<input type="file" id="file1" />
<textarea id="textarea1"></textarea>
No comments:
Post a Comment