Этот инструмент может быть вам нужен: tbdba-restore-mysqldump.pl
https://github.com/orczhou/dba-tool/blob/master/tbdba-restore -mysqldump.pl
, например Восстановить таблицу из файла дампа базы данных:
tbdba-restore-mysqldump.pl -t yourtable -s yourdb -f backup.sql
Используйте селектор атрибутов []
, например [for='+ this.id +']
, где this.id
- это ID из focus
изданного в настоящее время label
$('input').on("focus", function() {
var labelText = $('label[for='+ this.id +']').text();
console.log( labelText );
});
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="inp">This Is My Label Value</label>
<input id="inp" type="text" >
$("#ctl00_WebFormBody_txtPriceAdjustment").bind("click",function(){
alert($("label [for=" + this.id + "]").html());
});
или, возможно,
alert($(this).closest("label").html());
, в зависимости от вашей разметки, вы можете просто выбрать следующего или предыдущего родного брата.
попробуйте это:
$('input[type=text]').focus(function(){
alert($('label[for=' + $(this).attr('id') + ']').html());
});
$('#ctl00_WebFormBody_txtPriceAdjustment').click(function() {
alert($('#ctl00_WebFormBody_lblProductMarkup').text());
});