我剛剛遇到了this sample code,它具有包含外部源和身體的腳本標記。我認爲這是一種巧妙的方式將一些信息傳遞給包含的腳本。 它是如何工作的?帶有外部源和身體的腳本標記
<html>
<head>
<script src="http://unhosted.org/remoteStorage.js">{
onChange: function(key, oldValue, newValue) {
if(key=='text') {
document.getElementById('textfield').value= newValue;
}
},
category: 'documents'
}</script>
</head>
我不認爲這是如何工作的問題,而不是這是否會影響代碼的執行。 – Purag 2011-12-30 04:16:49