Vs'12 Asp.net C# MVC4、インターネット アプリケーション テンプレート
<script>
アクションリンクの情報を変更するドロップダウンリストを作成しようとしています。
私がソファーに持っているもの
function select_prospect() {
//Handle the select event
$('#YourActionLinkName')val() = $("#Prospects").val();
var val = $("#Clients").val();
var href = "/Prospect/Index/" + val;
this.href = ""; //clears out old href for reuse
this.href = href; //changes href value to currently slected dropdown value
}
ID/名前で Actionlink を取得してから、その値を変更し、対応する href をドロップダウンから追加しようとしています。私は何を間違っていますか?
編集:
Ufuksの回答ごとに、このコードを試しました
$('#YourActionLinkName').val(
$("#Prospects").val(),
this.href = "/Prospect/Create/" + $("#Prospects").val()
);
ページの下部にある < script > でもまだ actionlink が正しく更新されません。アイデア?