You can use the indexOf
function, which is supported in the function:
var table = client.getTable('tableName');
var queryValue = document.getElementById('txtField').value;
table.where(function(startsWith) {
return this.name.indexOf(startsWith) === 0; // for 'contains', use >= 0
}, queryValue).read().done(function(results) {
alert('Results: ' + JSON.stringify(results));
}, function(err) {
alert('Error: ' + JSON.stringify(err));
});