1
我想這個代碼添加:如何合併這兩個javascript代碼?
<script type="text/javascript" src="http://www.formstack.com/forms/js.php?1134414-uqmj2UXxEw-v2">
</script>
<noscript>
<a href="http://www.formstack.com/forms/CampusEnterprises-chopped_greens_order_form__copy" title="Online Form">
Online Form - Chopped Greens Order Form - COPY
</a>
</noscript>
在下面的JavaScript代碼的一端插入ISOPEN()方法的調用:
<head>
<script type="text/javascript">
var theDate = new Date();
var dayOfWeek = theDate.getUTCDay();
// Returns true if the restaurant is open
function isOpen()
{
//I'll fill this in later, for now, return true
return true;
}
</script>
</head><body>
<script type = "text/javascript">
if(isOpen())
{
//ADD CODE HERE
}
</script>
</body>
然而,當我試圖把剛纔複製並將它們粘貼在一起不起作用。我認爲它與嵌套標記有關,但我不確定
什麼不行? –
@ SteveO'Connor - 請參閱OP的最後一個問題:http://stackoverflow.com/questions/8023231/whats-wrong-with-my-javascript-code – Oded