在Sourcetree中单击“终端”并在窗口中使用// Will hold our XML DOM
var $xml;
// Select elements
var make = $('#make');
var model = $('#model');
var year = $('#year');
$.get('http://46.101.139.188/fitguide.xml', function(data){
$xml = $(data);
var rows = $(data).find('ROWSET ROW');
var makes = [];
$.each(rows, function(index, element){
var _make = $(element).find('MAKE').text();
makes.push('<option value="' + _make + '">' + _make + '</option>');
});
makes = $.unique(makes);
make.append(makes.join('\n'));
}, 'xml');
$('#make').on('change', function(){
var _value = $(this).val();
var _models = $xml.find('ROWSET ROW:contains("'+_value+'")');
var models = [];
$.each(_models, function(index, element){
var _model = $(element).find('Model').text();
models.push('<option value="' + _model + '">' + _model + '</option>');
});
models = $.unique(models);
model.append(models.join('\n'));
});
命令时,如何从剪贴板粘贴文本?
这些不能工作: