私がやっていることは、この次の送信ボタンをクリックするのと同じ結果になります。'this'という単語を使わずにjavascriptで 'this'オブジェクトを取得する
<input id="submit_http:" class="add_submit" type="button" onclick="return dex.forms.form_ajax_submit(this,function(res) { alert('posting failed'); },function(res) { alert('posting success'); });" value="Next" name="submit_http:">
私はそのようにそれをやろうとしました:
$('.NextButton').click(function() {
dex.forms.form_ajax_submit(document.getElementsByName('submit_http:'),
function(res) {
alert('posting failed');
},
function(res) {
alert('posting success');
});
});
しかしdocument.getElementsByNameは「この」 どのように私はこの問題を解決することができます送信ボタンと同じ結果 を返されていないように見えます?
を'? –
"submit"ボタンではなく "NextButton"に関連しているので私は使用できません – DanR
document.getElementsByIdでチェックしますか? – MCSI