0

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?

読んで返信する時間を取ってくれてありがとう、

4

1 に答える 1

0

こんにちはすべてなので、私は解決策をまとめました。おそらく最高ではありませんが、それは機能します

相互にリンクするホットリンクを備えた2つのドキュメントライブラリを作成しました。また、テンプレートフォルダ内の一意の画像(plan&Require)ごとに必要なファイル(dox、pptなど)のホットリンクもあります。これを行うには、もっとエレガントな方法が必要だと私は知っています。しかし、ソリューションを共有したかった。

コメント/提案された回答はありませんでしたが、質問を見てくれた多くの人に感謝します..タンブルウィード..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 3</title>
</head>

<body>

<map name="FPMap0" id="FPMap0">
<area title="Click to follow hyperlink" href="http://office.com/Templates/Planning/Checklist.xlsx" shape="rect" coords="736, 487, 826, 513" />
<area title="Click to follow hyperlink" href="http://officecom/Templates/Planning/Plan.mpp" shape="rect" coords="833, 529, 897, 552" />
<area title="Click to follow hyperlink" href="http://office.com/Templates/Planning/TEMPLATE_v2.ppt" shape="rect" coords="736, 567, 826, 591" />
<area title="Click to follow hyperlink" href="http://office.com/Templates/Planning/Template.mpp" shape="rect" coords="737, 529, 826, 551" />

<area title="Go to Page 2" href="http://office.com/Require/Forms/AllItems.aspx" shape="rect" coords="256, 144, 377, 177" />
</map>

<img src="actices/Images1/Best.jpg" usemap="#FPMap0"/>

</body>

</html>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<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.com/Templates/Information.docx" shape="rect" coords="240, 448, 489, 472" />
<area title="Click to follow hyperlink" href="http://office.com/Templates/Template.doc" shape="rect" coords="760, 490, 889, 514" />
<area title="click to follow hyperlink" href="http://office.com/Templates/Example.docx" shape="rect" coords="760, 512, 889, 537" />
<area title="click to follow hyperlink" href="http://office.com/Templates/_Example.docx" shape="rect" coords="760, 536, 891, 560" />
<area title="Click to follow hyperlink" href="http://office.com/Templates/Examples.vsd" shape="rect" coords="760, 575, 890, 598" />

<area title="Go to Page 1" href="http://office.com/Plan/Forms/AllItems.aspx" shape="rect" coords="136, 144, 240, 177" />

</map>
<img src="Images1/Require.jpg" width="960" height="720" usemap="#FPMap0" /></p>

</body>

</html>
于 2012-06-13T14:20:14.553 に答える