Tag: html

html span: left and right align

Posted by – August 5, 2010

Refers to:
1. http://www.htmlcodetutorial.com/help/archive.php/o_t__t_3052__start_0__index.html
2. http://www.quackit.com/html/tags/html_span_tag.cfm

Here’s a solution that might work for you (did for me)

I have multiple lines each enclosed in <div> tags. I want to have some left adjusted and right adjusted text on each line.

Here is some code for one line:
Code:
<div name=”line”>
<div name=”left_text” style=”text-align: left”>My left text</div>
<span name=”right_text” style=”float: right”>My right text</span>
</div>

As I understand it, the (inside) div is a block level element so it can be left adjusted. The span is a line level element, so it cant’ be right adjusted, but it can be floated on the right (just like an image would).

简谈HTA文件

Posted by – March 20, 2010

HTA就是一个HTML应用程序(HTML Application),文件扩展名为.hta,和EXE程序一样,只要双击就能运行。如果把HTA文件的扩展名改为.htm,那么这个文件就变成了一个普通的 网页。普通网页运行某些代码时,会出现一些警告。HTA程序被Windows认为是完全可以信赖的应用程序,可以直接从你的电脑读写文件和进行一些系统操作,不会出现警告。

打开notepad,试着输入以下代码:

<html>

<body>

<script language=’javascript’>

document.write(“hello world”);

</script>

</body>

</html>

并保存文件为test.hta,可以看到test.hta有着和exe文件一样的图标,双击执行,是不是看 到hello world了。赶快尝试吧。