これができるかどうかわかりませんが、できない場合は、可能であれば簡単な回避策を教えてください。ユーザーにimg(「カウボーイ」または「巨人」のID)を選択してもらいたいです。これらの値 (両方とも「1」) を取得し、それを ID「シナリオ」に返したいと考えています。この部分を除いて、他のすべてが機能し、それができないと感じています。したがって、提案は減価償却されます。
<script type="text/javascript">
//this is the user id session stored as a javascript variable
var userid = "<?=$id?>";
function bigimg(x) {
var myDate = new Date(); // Your timezone!
var myEpoch = myDate.getTime()/1000;
var deadline = '1344700055.000';
//determines if user was on time..if not on time hover enlarge won't work
if(myEpoch < deadline) {
x.style.height="65px";
x.style.width="85px";
x.style.opacity="0.5";
} else {}
}
function defaultimg(x) {
x.style.height="60px";
x.style.width="80px";
x.style.opacity="1.0";
}
function teamback(x) {
var myDate = new Date(); // Your timezone!
var myEpoch = myDate.getTime()/1000;
var deadline = '1344700055.000';
//determines if user was on time..if not on time submitting won't work
if(myEpoch > deadline) {
// update the "actualone" image's source to the sending-image's source
document.getElementById("actualone").src = x.src;
document.getElementById("curtime").innerHTML = myEpoch;
document.getElementById("team").innerHTML = x.id;
document.getElementById("team").innerHTML = x.value;
} else {}
}
</script>
</head>
<body>
Your Team<br>
<iframe style="background-color:red;" src="http://free.timeanddate.com/countdown/i38ik9yz/n417/cf12/cm0/cu4/ct1/cs1/ca0/co1/cr0/ss0/cac000/cpc000/pct/tc66c/fs100/szw320/szh135/tatTime%20Remaining%20to%20Make%20Picks/tac000/tptTime%20since%20Event%20started%20in/tpc000/iso2012-08-11T13:00:00" frameborder="0" width="236" height="36"></iframe>
<br><img id="cowboys" value="One" onmouseover="bigimg(this)" onclick="teamback(this)" onmouseout="defaultimg(this)" src="cowboys.gif"> vs <img id="giants" value="One" onmouseover="bigimg(this)" onclick="teamback(this)" onmouseout="defaultimg(this)" src="giants.gif"><img src="" id="actualone" style="width:85px; height:65px;"><br><br>
<img src="colts.gif"> vs <img src="bears.gif">
<div id="curtime">44</div>|||<div id="deadline"></div><br><div id="team">Team</div><div id="scenario">Scenario</div>
</body>
</html>