<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
Message.InnerHtml = "Welcome to ASP.NET";
}
</script>
...
<span id="Message" style="font-size:24" runat="server"/> ......
<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="img1" id="img1" src=""/>
<div id=2><img name="img2" id="img2" src=""/>
<div id=3><img name="img3" id="img3" src=""/>
</div>
</div>
</div>
</div>
</body>
</html>
html;
$pattern = "/(".
"<\!\w+(?:\s+[^>]*?)+\s*>|".
"<\w+(?:\s+\w+(?:\s*=\s*(?:\"[^\"]*\"|'[^']*'|[^\"'>\s]+))?)*\s*\/?>|".
"<\/\w+\s*>|".
"<\!--[^-]*-->".
")/";
preg_match_all($pattern, $s, $aMatches, PREG_OFFSET_CAPTURE);
function getMatchTags($s, $arr) {
$sMatchClose = '';
$arrClose = array();
$arrReturn = array();
for($i=0; $ ......
<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="img1" id="img1" src=""/>
<div id=2><img name="img2" id="img2" src=""/>
<div id=3><img name="img3" id="img3" src=""/>
</div>
</div>
</div>
</div>
</body>
</html>
html;
$pattern = "/(".
"<\!\w+(?:\s+[^>]*?)+\s*>|".
"<\w+(?:\s+\w+(?:\s*=\s*(?:\"[^\"]*\"|'[^']*'|[^\"'>\s]+))?)*\s*\/?>|".
"<\/\w+\s*>|".
"<\!--[^-]*-->".
")/";
preg_match_all($pattern, $s, $aMatches, PREG_OFFSET_CAPTURE);
function getMatchTags($s, $arr) {
$sMatchClose = '';
$arrClose = array();
$arrReturn = array();
for($i=0; $ ......
//回车:[\n\r\t]
$reg="|typeid=\"(.*)\" onsel.*[\n\r\t]*<a href="\" mce_href="\""#\">(.*)</a>|";
preg_match_all ($reg,
$html,
$out, PREG_PATTERN_ORDER);
foreach ($out as $value){
foreach ($value as $value2){
if(strlen($value2)<20)
echo ($value2."<br>");
}
}
//ikmb ......
//回车:[\n\r\t]
$reg="|typeid=\"(.*)\" onsel.*[\n\r\t]*<a href="\" mce_href="\""#\">(.*)</a>|";
preg_match_all ($reg,
$html,
$out, PREG_PATTERN_ORDER);
foreach ($out as $value){
foreach ($value as $value2){
if(strlen($value2)<20)
echo ($value2."<br>");
}
}
//ikmb ......
<html:select property='optdwdm' style='width:230' onchange='changedw(this)'>
<html:options collection='dwlist' property='dm' labelProperty='mc' />
</html:select>
在标签的 ONCHANGE 事件里面定义一个 changedw(this)
然后可以通过以下代码获取 html:select 选取的 VALUE 和 TEXT
// text 获取html:options的labelProperty,即 mc
var strsel_value = obj.options[obj.selectedIndex].text;
// value 获取html:options的property,即dm
var strsel_id = obj.options[obj.selectedIndex].value;
......
如何表示上级目录
../表示源文件所在目录的上一级目录,../../表示源文件所在目录的上上级目录,以此类推。
假设info.html路径是:c:\Inetpub\wwwroot\sites\blabla\info.html
假设index.html路径是:c:\Inetpub\wwwroot\sites\index.html
在info.html加入index.html超链接的代码应该这样写:
<a href = "../index.html">index.html</a>
假设info.html路径是:c:\Inetpub\wwwroot\sites\blabla\info.html
假设index.html路径是:c:\Inetpub\wwwroot\index.html
在info.html加入index.html超链接的代码应该这样写:
<a href="../../../index.html">index.html</a>
假设info.html路径是:c:\Inetpub\wwwroot\sites\blabla\info.html
假设index.html路径是:c:\Inetpub\wwwroot\sites\wowstory\index.html
在info.html加入index.html超链接的代码应该这样写:
<a href = "../wowstory/index.html">index.html</a>
如何表示下级目录引用下级目录的文件,直接写下级目录文件的路径即可。假设info.html路径是:c:\Inetpub\wwwroot\sites\blabla\info.html假设index.html路径是:c:\Inetpub\wwwroot\sites\blabla\h ......
<mce:style type="text/css"><!--
#summary{word-wrap:break-word;width:500px;margin: 0px;padding: 0px;};
.formIn th{white-space: nowrap;}
.formIn{ margin-left: 90px;}
--></mce:style><style type="text/css" mce_bogus="1"> #summary{word-wrap:break-word;width:500px;margin: 0px;padding: 0px;};
.formIn th{white-space: nowrap;}
.formIn{ margin-left: 90px;}
</style> ......