HTMLの質問があります。私はSharePointを使用しています-SharepointDesignerに取り組んでいます。現在別々に機能している要素として結合しようとしています。私はhtmlを初めて使用するので、この質問を作成する際の結束力の欠如を許してください。
1ページ目。3つの異なる画像から選択する機能を使用しています
function changeIt(imageName,objName)
{
var obj = document.getElementById(objName);
the if statement below is just how i've been trying to toggle between visible and not based on a certain criteria:
//************
if (imageName == 'http://office-na.ms.com/ops/SecuritiesOperations/Images1/NoneSelected.JPG')
{
document.getElementById('falseyear').style.display = 'block';
}
else
{
document.getElementById('falseyear').style.display = 'none';
}
//**************
var imgTag = "<img src='"+imageName+"' border='0' />";
obj.innerHTML = imgTag;
return;
}
/script>
</head>
<body>
<a id="one" href="#" onclick="changeIt('http://office-na.com/NoneSelected.JPG','image1');">Main</a>
<a id="two" href="#" onclick="changeIt(,http://office-na.com/PlanningSelected.JPG','image1');">Planning</a>
<a id="three" href="#" onclick="changeIt('http://office-na.com/RequirementSelected.JPG','image1');">Requirement</a>
<div id="image1">
<img src="http://office-na.com/NoneSelected.JPG" border="0" alt="one" usemap="#FPMap0" />
</div>
<div id="falseyear" style="display:none"><h3>The year you entered is not valid</h3></div>
<br/><br/>
</body>
</html>
// 2番目の部分では、次のように画像の1つにホットスポット(ハイパーリンク)を設定しました
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
</head>
<body>
<p><map name="FPMap0" id="FPMap0">
<area title="Click to follow hyperlink" href="http://office-na.ms.com/Templates/Blank%20Template.doc" shape="rect" coords="760, 490, 889, 514" />
<area title="click to follow hyperlink" href="http://office-na.ms.com/Templates/Small%20Template.ppt" shape="rect" coords="760, 512, 889, 537" />
<area title="click to follow hyperlink" href="http://office-na.ms.com/Templates/Large%20Template.ppt" shape="rect" coords="760, 536, 891, 560" />
<area title="Click to follow hyperlink" href="http://office-na.ms.com/Templates/Blank%20Template.ppt" shape="rect" coords="760, 575, 890, 598" />
</map>
<img alt="Practice" src="Best.jpg" width="960" height="720" usemap="#FPMap0" /></p>
</body>
</html>
セクション1で選択した画像に応じてホットスポットを追加できるように、この2つを組み合わせて作成したいと思います。では、選択した画像に応じてマップのハイパーリンクを追加/変更する方法はありますか?そのため、最初のセクションにifステートメントを追加して、基準に基づいて何かのオンとオフを切り替えることができるかどうかを確認しました。これはhtmlでできることですか?そうでない場合は、どの言語を調べる必要がありますか?asp.net?Javascript?
読んで返信する時間を取ってくれてありがとう、