この作品..jqueryの変数置換
$("select[title='First Choice'] option[text='hello']").remove();
本のバリエーションの数は..私はこれが愚かであるかを知りません。
var what='hello';
$("select[title='First Choice'] option[text=$what]").remove();
も試しました。あなたはこの希望
$("select[title='First Choice'] option[text=$(what)]").remove();
$("select[title='First Choice'] option[text='$what']").remove();
$("select[title='First Choice'] option[text=$what.val()]").remove();
これはjavascriptのある、PHPではない...テキスト置換のこれらのタイプにも適用されません。文字列に手動で挿入する必要があります。 – mellamokb