あるのhref魔女にインラインJavaScriptを行うことだったにデータベースにgotoURL行を変更する必要:javascript:navClickListener('bodyContent', 'http://192.168.1.34/wiki/index.php/Airworthiness_Directive #content');
これは重要であり、そのことnewItem.find("a").attr("href", this.gotoURL);
がjQuery.getJSON(url [, data] [, success(data, textStatus, jqXHR)])
関数で実行されたときに、両端に二重引用符を維持するためにインラインで処理します。インラインjavaScriptの他のタイプのメソッドは動作しません! (すなわち:。
REMOVED:
:
var gotoURL = '';//<--..AND GET THE ITEMS LINK INTO THIS VAR...
navClickListener(appendE, target, gotoURL);
にnavClickListener()関数を変更しのonClick
追加のスクリプトは、上からの変更は前に終了引用符が--See javascript:void(0);" onclick='javascript:navClickListener("navContent", "bodyContent" "http://192.168.1.34/wiki/index.php/Airworthiness_Directive #content");')
<
function navClickListener(target, gotoURL) {
$('#' + target).load(gotoURL);
};
gotoURLのデータベースデータが変更されました:
/wiki/index.php/Airworthiness_Directive #content
へ:
javascript:navClickListener('bodyContent', 'http://192.168.1.34/wiki/index.php/Airworthiness_Directive #content');
すべてがハイパーリンクをキャッチするために、変数を必要とする点に動作します。 – CelticParser
'newItem.find(" a ")。attr(" href ")'は 'href'属性の値を取得します。 –
@Rocket早くそれを試して、うまくいきませんでした。 Thnx – CelticParser