The jQuery Media Plugin supports unobtrusive conversion of standard markup into rich media content.
It can be used to embed virtually any media type, including Flash, Quicktime, Windows Media Player, Real Player, MP3, Silverlight, PDF and more, into a web page.
The plugin converts an element (usually an) into a which holds the object, embed or iframe tags neccessary to render the media content.
目前分類:JavaScript (6)
- Dec 26 Fri 2008 14:26
[jQuery] Media Plugin
- Dec 26 Fri 2008 11:56
[jQuery]Featured Content Glider
- 基本型
- Dec 17 Mon 2007 12:30
取得 HTML 中的元素
先來看一下範例:
在這範例中,若要取得 form 裡面的 text 的元素的話,相信應該是很多人都會用 document.all("text1") 或是用 document.form1.text1 吧!在 IE 、 FireFox 及 Opera 中,以上兩種寫法都是可以執行的,但要注意的是: document.all 並非是標準的寫法。
- Dec 17 Mon 2007 12:27
IE 與 FIREFOX 的相容性問題
1. document.form.item 問題
(1)現有問題:
現有程式碼中存在許多 document.formName.item("itemName") 這樣的語法,不能在 MF 下執行
(2)解決方法:
改用 document.formName.elements["elementName"]
(3)其它
參見 2
- Dec 17 Mon 2007 12:26
動態改變iFrame的高度
Use this javascript function in your frame page..
"
function resizeIframe(iframeID) {
if(self==parent) return false; /* Checks that page is in iframe. */
else if(document.getElementById&&document.all) /* Sniffs for IE5+.*/
var FramePageHeight = framePage.scrollHeight + 10; /* framePage
is the ID of the framed page's BODY tag. The added 10 pixels prevent an
unnecessary scrollbar. */
parent.document.getElementById(iframeID).style.height=FramePageHeight;
/* "iframeID" is the ID of the inline frame in the parent page. */
}
"
and run it on load
"<body id="framePage" onload="resizeIframe('idTopFrame')">"
- May 03 Thu 2007 17:37
動態修改IFrame的高度
<head><title>Container</title>
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('iframename').contentDocument.body.scrollHeight;
document.getElementById('iframename').style.height = h;
}
else if(document.all) {
h = document.frames('iframename').document.body.scrollHeight;
document.all.iframename.style.height = h;
}
}
</script>
</head>
<iframe onLoad="iFrameHeight();" src="http://localhost/" scrolling="no" scroll="no" id="iframename" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
</body>
</html>