-2
這是一個非常簡單的問題,但可能很簡單,我無法在網上找到答案。我先假設這是正確的不能撥打javascript <script>
<html>
<head>
<script language="javascript" type="text/javascript">
function sayit(){
alert('hello');
}
</script>
</head>
<body>
<button onclick="sayit()">Say it</button>
</body>
</html>
此代碼應工作不應該嗎?
它工作嗎?當你嘗試時發生了什麼? –
完美的時間嘗試http://jsfiddle.net –
適合我。必須是瀏覽器問題,特別是關於'language'屬性的問題。 –