Hi
I am looking for a RegularExp for a file path ;
Example : /com/bytes/file/Hello.txt
The path should endwith .txt ,i.e. it is a txt of type.
Thanks
User Profile
Collapse
-
RegularExp for a file path
-
Validate with javascript regular-exp. -
How can i validate a classpath with regular expression
I want to validate the class path string with regular exp and here is the correct format : "java.lang.util " .
how to write a effective regular exp ? -
How to add a event to a TR dynamicly created
Hi,
here i created a TR element using document.create Element("TR");e xample :
oRow = document.create Elemet("TR");
and then i added a attribute "style" on it :
oRow.style.curs or="pointer"; //it does work! But ... have a look at this one :
oRow.onmouseove r="this.style.b ackgroundColor= '#ced6de';" ; //it doesn't work well.
anybody can... -
Hi,thanks for ur reply.
Actually,i do iterate over json object as you did.
And it's really a very complex data-structures,I supposed to create a query method that it could iterate over the data fields and find the suited value.The value returned may be an object or a string, and also could in deep-hiberarchy.So,I should recursively query each field that if it is a object type field,and this recursion nested in a loop. The issue is that...Leave a comment:
-
[Recursion] Always return null from recursion ?
hi ...
here is a recursion , suppose it will return a value and
but,,,when the function returned with a value ,and a var incept it,
still it is null or undefined..
the code here:
[CODE=javascript]function invokeRec () {
var v = dataQuery(data, query) ; //assume that data and query are available , i.e. data is an array with some elements and query is a valid term
alert(v);... -
michaelscript replied to How to get the function name and parameters a (onclick) event handler invokedin Javascripthi,it looks likely to get a function name and parameters by parsing string is a good way or only.still,it's a good approach . thanks a lot!Leave a comment:
-
michaelscript replied to How to get the function name and parameters a (onclick) event handler invokedin JavascriptActually,i may have an function called showFuncNameAnd Para() ,and i wish i could get the function name and parameters on its onclick event handler ,just like this :
[CODE=javascript]funtion showFuncNameAnd Para () {
el = document.getEle mentById("ck1") ; //now i get the element and then wish to
//get its onclick attribute value ,
//i wannar get a the function name "func1" on onclick event...Leave a comment:
-
michaelscript started a topic How to get the function name and parameters a (onclick) event handler invokedin JavascriptHow to get the function name and parameters a (onclick) event handler invoked
Here is a simple code :
[CODE=javascript]<input type="checkbox" id="ck1" onclick="func1( 'para1')">
<script>
alert(ck1.oncli ck); //result of this:
/////////////////////
function anonymous () {
func1('para1')
}
/////////////////////
</script>[/CODE]
and when i try to get the type of 'ck1.onclick'...
No activity results to display
Show More
Leave a comment: