다음 자바 작업을 얻으 려합니다 (formstack.com의 특정 날짜에 표시되는 임베디드 설문 조사 여야 함). 그러나, 내가 그것을 보려고 할 때 나는 표시되는 모든 문자열 (따옴표 제외) " ');)"무엇이 잘못 되었나요? document.write를 ... 내부 실행에 실패 자바 스크립트의document.write ("...</script>")가 내 코드를 손상시키는 이유는 무엇입니까?
<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())
{
document.write('<script type="text/javascript" src="http://www.formstack.com/forms/js.php?1134414-uqmj2UXxEw-v2"></script>');
}
</script>
</body>
아니 대부분의 설명이 질문 제목을. ..'/ /' –
doctype 및 html 태그는 어디에 있습니까? – Shomz
작동 방식 : http://jsfiddle.net/wYrze/1/ –