<div id="example"></div>
<script type="text/javascript">
jah = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
jah+= "<p>Browser Name: " + navigator.appName + "</p>";
jah+= "<p>Browser Version: " + navigator.appVersion + "</p>";
jah+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
jah+= "<p>Platform: " + navigator.platform + "</p>";
jah+= "<p>User-agent header: " + navigator.userAgent + "</p>";
document.getElementById("example").innerHTML=jah;
</script>
我使用上面的代碼來編譯一些瀏覽器信息,我需要從表單中收集。我怎樣才能將這些信息傳遞給Input或Textarea?jquery填充輸入或文本區域
在此先感謝!
我稍微困惑,因爲你在標題問jQuery的,但那麼你的例子是純粹的JavaScript。 – Moni