「test」という関数に「true」という変数があるとします。次に、まったく別のスクリプト タグに別の関数があり、新しい関数を使用して "true" に変更したいと考えています。これどうやってするの?ありがとう。
<script type="text/javascript">
var hello="no";
if(hello=="yes"){
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "Message";
}
}
</script>
<script type="text/javascript">
function show(id) {
$('#' + id).show();
var hello="yes";
}
</script>
機能していないようです...