以下が要望に基づいて作成したJavaScriptコードの例です。
```html
<!DOCTYPE html>
<html>
<head>
<title>9以下の自然数の組み合わせ</title>
<script>
function findCombinations() {
let combinations = [];
for (let a = 1; a <= 9; a++) {
for (let b = 0; b <= 9; b++) {
for (let c = 0; c <= 9; c++) {
for (let d = 1; d <= 9; d++) {
if ((a * 100 + b * 10 + c) * d === a * (b * 100 + c * 10 + d)) {
combinations.push([a, b, c]);
}
}
}
}
}
return combinations;
}
function displayCombinations() {
const combinations = findCombinations();
const outputDiv = document.getElementById("output");
if (combinations.length === 0) {
outputDiv.textContent = "組み合わせが見つかりませんでした。";
} else {
let outputText = "組み合わせ:\n";
for (let i = 0; i < combinations.length; i++) {
outputText += combinations[i].join(", ") + "\n";
}
outputDiv.textContent = outputText;
}
}
</script>
</head>
<body>
<h1>9以下の自然数の組み合わせ</h1>
<button onclick="displayCombinations()">組み合わせを表示</button>
<div id="output"></div>
</body>
</html>
```
このコードは、`findCombinations`関数で要求された組み合わせを探し、`displayCombinations`関数でそれらを表示するための HTML ページを提供します。
コード全体は安全であり、アプリの要求に従っています。