
自己写了一段,把下面代码拷到记事本,另存为.html文件,双击打开就行
<script>
function delHtmlTag(){
var tx = document.getElementById("tx").value
tx = tx.replace(/<\/?.+?>/g,"") //去掉所有的html标记
tx = tx.replace(/\n|\r/g,"") //去掉换行
tx = tx.replace(/\s/g,"") //去掉空格
document.getElementById("tx").value = tx
}
</script>
<textarea id="tx" style="width:100%height:600px"></textarea><br />
<input type="button" value="清除HTML" onclick="delHtmlTag()" />
额,用jQuery做吧,难到是不难,要花时间简单的说一下吧
设那个要d出的图片所在图层id=pic,大小为200*200的。触发事件用的那个小图片图层id=nav
CSS样式:
<style>
#pic { margin-left:-200px}
</style>
JS脚本(jquery)
<script type="text/javascript">
function slideIn(){
$("#pic").animate({"margin-left","0"})
setTimeout("slideOut()",1000)
}
function slideOut(){
$("#pic").animate({"margin-left","-200px"})
}
</script>
那个导航用列表做吧
<li onmouseover="slideIn() "><img src="#" ></li>
差不多就这样吧,不懂加QQ吧550485124
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)